WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

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.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2008, 03:03 AM
edhan's Avatar
edhan edhan is offline
WebProWorld Veteran
 

Join Date: Aug 2003
Location: Singapore
Posts: 509
edhan RepRank 1
Question Separate url link

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++;
}

?>
__________________
Receiving & Giving To Society
Thai Buddha Amulets & Tibetan dZi Beads | Ads Revenue Sharing | Shopping Online
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 11:07 AM
To separate or not separate... that is the question pdstein Search Engine Optimization Forum 8 11-24-2005 09:19 AM
Scrolling vs separate pages James Bull Graphics & Design Discussion Forum 11 09-23-2004 12:30 PM
Redirect vs Separate Sites PunkyLZ Search Engine Optimization Forum 3 06-26-2004 06:14 AM
connecting to separate networks with laptop Jacko IT Discussion Forum 3 04-05-2004 10:45 PM


Search Engine Friendly URLs by vBSEO 3.0.0