easy done but then it would replace all matches ie "blah" in the content
would be removed :|

it worked when i did

$string = "<img height=\"44\" alt=\"\" hspace=\"0\" src=\"blah.jpg\"
width=\"148\" border=\"0\">";

but when i do

$string ="<table class=\"tablecontent\" cellspacing=\"0\" cellpadding=\"10\"
width=
\"100%\" border=\"0\">
<tbody>
<tr>
<td><a href=\"blah.php\" target=\"_blank\"><img
height=\"44\" alt=\"\" hspace=\"0\" src=
\"blah.jpg\"
 width=\"148\" border=\"0\"></a></td>
<td>View your account information. This option is only available to
investors who have authorised us to make this facility available.
Please contact us if you wish to have enquiry access to your
data.</td>
</tr>
</tbody>
</table>";

this doesnt work

using this echo preg_replace('/(<img.+?src=)"([^"]+)"([^>]*>)/i', '\1\2\3',
$string);
"Jason Wong" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wednesday 31 July 2002 20:38, electroteque wrote:
> > hmm sorry it didnt seem to work , it  did then i gave it more than an
img
> > tag in a string and now it doesnt
>
> If all you're doing is stripping the double-quotes why don't you use
> str_replace() as someone suggested?
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
>
> /*
> Denver, n.:
> A smallish city located just below the `O' in Colorado.
> */
>



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

Reply via email to