Search found 8 matches

by ryanrbftp
Thu Jun 15, 2006 4:11 pm
Forum: PHP - Code
Topic: Extracting certain text from PHP string...
Replies: 14
Views: 827

That worked a treat. Now i've just gotta add the http://domainname.com before the image file!

Thanks guys.
by ryanrbftp
Thu Jun 15, 2006 4:06 pm
Forum: PHP - Code
Topic: Extracting certain text from PHP string...
Replies: 14
Views: 827

no, $src = $src[0][1] didnt even print anything.
by ryanrbftp
Thu Jun 15, 2006 4:03 pm
Forum: PHP - Code
Topic: Extracting certain text from PHP string...
Replies: 14
Views: 827

No, changing 1 to 0 didnt work either. It's because its printing only the first line of the output in my script. How can I get it to print only the

Code: Select all

/images/aircraft/fs2002civiljets/737smokelarge.jpg
by ryanrbftp
Thu Jun 15, 2006 3:59 pm
Forum: PHP - Code
Topic: Extracting certain text from PHP string...
Replies: 14
Views: 827

Sorry, I have changed my code to the following, but still nothing: $data = $row['description']; $regx = "|src\=\"?'?`?([[:alnum:]:?=&@/._-]+)\"?'?`?|i"; preg_match_all ( $regx, $data, $src ); $src = $src[1]; echo "<g:image_link>$src</g:image_link>\n"; Printr of arra...
by ryanrbftp
Thu Jun 15, 2006 3:55 pm
Forum: PHP - Code
Topic: Extracting certain text from PHP string...
Replies: 14
Views: 827

Code: Select all

$data = $row['description'];

        $regx = "|src\=\"?'?`?([[:0123456789:]:?=&@/._-]+)\"?'?`?|i";

        preg_match_all ( $regx, $data, $src );


        $src = $src[1];

	echo "<g:image_link>$src</g:image_link>\n";
by ryanrbftp
Thu Jun 15, 2006 3:35 pm
Forum: PHP - Code
Topic: Extracting certain text from PHP string...
Replies: 14
Views: 827

Still the same, just comes up with "Array". I'm entering :0123456789: and have also tried without the colons. Any ideas?
by ryanrbftp
Thu Jun 15, 2006 2:54 pm
Forum: PHP - Code
Topic: Extracting certain text from PHP string...
Replies: 14
Views: 827

Thank you for your reply. This is my code: $data = $row['description']; $regx = "|src\=\"?'?`?([[]:?=&@/._-]+)\"?'?`?|i"; preg_match_all ( $regx, $data, $src ); // strip array(0), don't need it $src = $src[1]; echo "<g:image_link>$src</g:image_link>\n"; However, all...
by ryanrbftp
Thu Jun 15, 2006 1:54 pm
Forum: PHP - Code
Topic: Extracting certain text from PHP string...
Replies: 14
Views: 827

Extracting certain text from PHP string...

Using PHP, If I had the following string: original and flight model "Robert Versluys" repaint in Air Dolomiti by "Massimo Grassi" full 3 d texture,movimg parts,night effects<br><img src="/images/aircraft/fs2002civiljets/airdccrj2.jpg" width="150" height="...