On Wednesday 29 September 2004 08:46, Ed Lazor wrote:
> <complain>
> Today I discovered that my ISP can't upgrade to PHP 5.  They use Plesk for
> server Administration and PHP 5 apparently breaks Plesk.  Plesk says
> they'll make PHP 5 support available as soon as it starts coming default on
> RedHat Enterprise.
> </complain>
>
> Unfortunately, I now have a bunch of scripts that require PHP 5.  I'd
> upgraded my beta server for testing and everything has been going so great
> that I went gungho.  Honestly, I tried to not too many of the new features,
> just so I could ease into it and do more testing.  I'm finding little
> differences that I didn't even realize I was taking advantage of.  For
> example, there are a lot of places in the code where I've done something
> like this:
>
> print "Learn more about {$product->get_Title()}.<br>";

http://www.php.net/manual/en/function.preg-replace.php

$pattern = "/\{\$(.+?)\}/i";
$replacement = "\"\.\$$1\.\"";

Try this out ;-) I haven't tested it but it's the right direction ;-)

>
> I uploaded scripts like this to the production server for more testing and
> PHP4 flagged all of the code like this as parse errors.  I'm not sure, but
> now I'm stuck having to go through all of the code to change the coding
> style....  my editor (Dreamweaver MX 2004) allows me to do a global search
> and replace using regular expressions.  I have no idea what regular
> expression I'd use for something like this.  Any recommendations?
>
> Thanks,
>
> Ed

-- 
Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)
---------------------------------------------------------------------
Orbitel - the New Generation Telecom! See www.orbitel.bg.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to