Re: regex to change ' to ?

From: Date: Thu, 04 Mar 2004 15:53:06 +0000
Subject: Re: regex to change ' to ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-179460@lists.php.net to get a copy of this message
Thank you, that works great! On Thu, 4 Mar 2004, Richard Davey wrote: > Hello Adam, > > Thursday, March 4, 2004, 3:36:06 PM, you wrote: > > AW> What would be the PHP expression to change any and all ' to ? in a > AW> variable? > > AW> I want to change any and all ' in $_POST[data] to ? > > $output_array = str_replace("'", "?", $_POST); > > Use this instead of a reg exp for such a simple task, it's quicker and > will cope with the whole array in one command. > >

« previous php.general (#179460) next »