|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Hi
I am trying to separate each url with a <br> feed from the database. As some of the url are a string of urls like: http://www.domain.com/image1.gif;htt...com/image2.gif whereas some are just a single url. So, how am I to split them into a single url per line? Any advice is appreciate. Code:
<?
$username="dbuser";
$password="dbpassword";
$database="database";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM post_photo";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<b><center>Database Output</center></b><br /><br />";
$imgcode=split(";",$row[extcode] );
$i=0;
while ($i < $num) {
$imgcode=mysql_result($result,$i,"extcode");
echo "<b>$imgcode
</b><br />";
$i++;
}
?>
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SEO vs SEO – Separate Blog From Main Domain? | mjtaylor | Search Engine Optimization Forum | 31 | 06-05-2007 12:07 PM |
| To separate or not separate... that is the question | pdstein | Search Engine Optimization Forum | 8 | 11-24-2005 10:19 AM |
| Scrolling vs separate pages | James Bull | Graphics & Design Discussion Forum | 11 | 09-23-2004 01:30 PM |
| Redirect vs Separate Sites | PunkyLZ | Search Engine Optimization Forum | 3 | 06-26-2004 07:14 AM |
| connecting to separate networks with laptop | Jacko | IT Discussion Forum | 3 | 04-05-2004 11:45 PM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |