> I am working on a pretty huge site with thousands of files with php code. > Unfortunatelly the app throws a ton of notices du to missing '' in arrays. Of > course I could simply disable the output on the dev server to surpress > notices, but I would rather like to get it fixed. > > Has somebody a good idea on how to fix this automated somehow with regex? > > The vars are right now: $var[element] and should be $var['element'] > > I was looking into sed, but I was hoping that there is also a way in php. Has > anybody a hint on how to get the regex done? > > I appreciate any help on that.
Hi Merlin I don't know what is sed, (and perhaps this is what you meant by that), but a good text editor could do the job in one decent regex, global replace. Seems like asking PHP to do it is the same task, plus the added code (hassle) to walk all your directories for affected files. - Govinda -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php