For the creation of a prepopulate link, how can i strip out slashes if they occur in the title? if(isset($node-&gt;field_eventform['und'][0]['nid'])) {
          echo '&lt;div class="field field-name-field-eventform field-type-node-reference field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even"&gt;';
          echo '&lt;a href="/node/'.$node-&gt;field_eventform['und'][0]['nid'].'/'.$node-&gt;title.'/'.$node-&gt;nid.'"&gt;'.$node-&gt;field_eventform['und'][0]['node']-&gt;title.'&lt;/a&gt;';
        echo '&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;';
   }

?&gt;


With this snippet we prepopulate a webform for events. But when a site editor uses a "/" in the title the link doesn't work anymore. How can I strip out slashes if they occur in the title?
echo '&lt;a href="/node/'.$node-&gt;field_eventform['und'][0]['nid'].'/'.str_replace('/','',$node-&gt;title).'/'.$node-&gt;nid.'"&gt;'.str_replace('/','',$node-&gt;field_eventform['und'][0]['node']-&gt;title).'&lt;/a&gt;';


You have to check, if the link works, when you strip the '/', if not, replace the '' in str_replace with the correct replacement, that your path alias use.