{"id":6674567,"date":"2015-10-22T16:07:33","date_gmt":"2015-10-22T16:07:33","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-replace-command\/"},"modified":"2016-08-30T19:24:36","modified_gmt":"2016-08-30T19:24:36","slug":"php-replace-command","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-replace-command\/","title":{"rendered":"PHP replace command"},"content":{"rendered":"<p>I have WP All Import Pro!<br \/>\nIk want to replace a tekst in 3 of the field in the downloaded XML.<\/p>\n<p>I created a PHP entry in the import-definition like<br \/>\n&lt;?php<br \/>\n[str_replace(&#8220;Dames &#8220;, &#8220;&#8221;, fields[1]\/CategorieOmschrijving[1])]<br \/>\n[str_replace(&#8220;Dames &#8220;, &#8220;&#8221;, fields[1]\/ShopOmschrijving[1])]<br \/>\n[str_replace(&#8220;Dames &#8220;, &#8220;&#8221;, fields[1]\/KenmerkadviseurOmschrijving[1])]<br \/>\n?&gt;<\/p>\n<p>For some kind of reason this doesn&#8217;t work<\/p>\n<p>Example: fieldvalue &#8216;Dames Schoenen&#8217; should be &#8216;Schoenen&#8217;<br \/>\nI don&#8217;t want to use &#8216;mapping&#8217; because there are 100+ possible value&#8217;s<\/p>\n<p>Please help<\/p>\n<p>https:\/\/wordpress.org\/plugins\/wp-all-import\/<\/p>\n","protected":false},"template":"","class_list":["post-6674567","topic","type-topic","status-publish","hentry","topic-tag-php","topic-tag-str_replace"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6674567","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/6674567\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=6674567"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}