Re: eregi_replace()
| From: | John Taylor-Johnston | Date: | Sat, 10 Jul 2004 00:50:02 +0000 |
| Subject: | Re: eregi_replace() | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190117@lists.php.net to get a copy of this message | ||
>isnt that what you want?
Hmm? Yes. But it doesn't work for me? It cannot be a php verison thing, can it?
I have phpversion() 4.1.2. I don't get it? :)
Compare with:
http://compcanlit.usherbrooke.ca/new1/db/index.php?searchenquiry=Never%20Cry%20Wolfe
and then:
http://compcanlit.usherbrooke.ca/new1/db/index.php?searchenquiry=Never%20cry%20Wolfe
Here is my code:
<td>".preg_replace ('/('.$searchenquiry.')/i' ,
"<b>$1</b>", $mydata->AU)." </td>
<td>".preg_replace ('/('.$searchenquiry.')/i' ,
"<b>$1</b>", $mydata->ST)." </td>
<td>".preg_replace ('/('.$searchenquiry.')/i' ,
"<b>$1</b>", $mydata->BT)." </td>
<td>".preg_replace ('/('.$searchenquiry.')/i' ,
"<b>$1</b>", $mydata->JR)." </td>
> I just tried this code:
>
> $searchenquiry = "Never cry Wolfe";
> $mydata = "... Never Cry Wolfe ...";
> $new = preg_replace ('/('.$searchenquiry.')/i' ,
> "<b>$1</b>", $mydata);
> echo "<td>$new </td>";
>
> here was my output:
>
> <td>... <b>Never Cry Wolfe</b> ... </td>
>
> isnt that what you want?