Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

separate text from the image into two different variables

images php coding issues or problems here.

Moderators: macek, egami, gesf

separate text from the image into two different variables

Postby ebchosting » Sat Jun 11, 2011 8:07 am

For example
<img src="http://www.vesti-online.com/data/images/2011-06-05/156013_sampioni_kf.jpg?ver=1307647416"><br/>Upravo završena klupska sezona obeležena je potpunom dominacijom Partizana, s obzirom da su sekcije našeg najbrojnijeg sportskog društva osvojile čak 11 pehara u pet najpopularnijih kolektivnih sportova.<br/><br/>


this is part of som news article wich i have in my database in tabele.

How i can to separete imege url from rest part of text in 2 diferent variable

$image_url = " url image value from item";
$text = "rest of text value";

in this example final resolt wil be

$image_url = "http://www.vesti-online.com/data/images/2011-06-05/156013_sampioni_kf.jpg";
$text = "Upravo završena klupska sezona obeležena je potpunom dominacijom Partizana, s obzirom da su sekcije našeg najbrojnijeg sportskog društva osvojile čak 11 pehara u pet najpopularnijih kolektivnih sportova.";


thanks.
ebchosting
New php-forum User
New php-forum User
 
Posts: 1
Joined: Sat Jun 11, 2011 7:56 am

Re: separate text from the image into two different variable

Postby egami » Mon Jun 13, 2011 4:36 am

what is it that you are trying to accomplish, exactly?
As of now, your image and your text are separated. Not sure what you're asking for.
User avatar
egami
php-forum GURU
php-forum GURU
 
Posts: 2197
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT

Re: separate text from the image into two different variable

Postby Nullsig » Mon Jun 13, 2011 12:11 pm

are you trying to scrap a site or something. I can't think of another application where you are starting with raw html and trying to parse it out into PHP.
User avatar
Nullsig
php-forum Fan User
php-forum Fan User
 
Posts: 981
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.