Results 1 to 2 of 2
I have this PHP Program I have been hobbying for years. Started in old PHP3 early PHP4. So with the newer PHP, things are starting to break!
I have this ...
- 02-22-2010 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 1
Replace strings CONTAINING apostrophes
I have this PHP Program I have been hobbying for years. Started in old PHP3 early PHP4. So with the newer PHP, things are starting to break!
I have this string:
session_is_registered('UserID')
And I need to convert to this:
isset($_SESSION['UserID'])
in more than 200 scripts in my directory. I have been toying with sed (in a copy of the dir of course in case I really screw things over, lol) but am not gettig too far. The new code needs to swap ( ) for [ ] and i'm just all hung up!
Any help will be hugely appreciated!
- 02-22-2010 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 452
welcome to the forum
sed 's/(/[/;s/)/]/' <filenamethe sun is new every day (heraclitus)


Reply With Quote