Jump to content

annuity

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

annuity's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. No way google has indexed this thread already! wow! I was searching for a formula to work out where to put the backslashes and the first result is this thread! To be honest that doesn't bode well for me being able to find a formula for newbies like myself to try and work out how to convert the function but i'll keep going. If anyone can help me convert this line of code to preg_replace it would be much appreciated. $data=eregi_replace(">"."[[:space:]]+"."<","><",$data); I'm thinking along the lines of $data=preg_replace("/>/"."/[[:space:]]+/"."/</","/></",$data); but i'm not sure and as i say i need to get this right. Cheers.
  2. Hi, Since upgrading to php 5.3 i have a line of code on my site that is giving me a depreciated error. The line of code is as follows: $data=eregi_replace(">"."[[:space:]]+"."<","><",$data); I've got as far as knowing i need to change it from eregi_replace to preg_replace but i can't for the life of me work out where to put any backslashes etc, if any. Is there a formula for working this type of thing out? Every example i see has backslashes and $1's all over the place. Do i simply do this "/ and this /" after and before every double quote? Or is it not as simple as that? Things never are are they! Please could an expert on here offer me any assistance. This is an important line of code(i think) so i didn't want to experiment as i would normally do, i need to get this right first time as i don't know what will happen if i get this wrong. Cheers.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.