iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar 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.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2008, 04:03 AM
edhan's Avatar
WebProWorld Veteran
 
Join Date: Aug 2003
Location: Singapore
Posts: 716
edhan RepRank 3edhan RepRank 3edhan RepRank 3
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++;
}

?>
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

BB 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 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


All times are GMT -4. The time now is 04:38 AM.



Search Engine Optimization by vBSEO 3.3.0