Your Ad Here

 Navigation
Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links




 Sponsors
 Links
low cost magazines
wwwstores
software directory
 Downloads
 Misc
Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming

Valid XHTML 1.0 Transitional


Valid CSS!


Multiple ticker symbols


Multiple ticker symbols

We had a query from a user who used our stock ticker script and liked it , there query was how about supporting multiple stock tickers . So we set about creating this updated version of our script .

In this example the user must enter the ticker symbols seperated by a comma like this MSFT , SUN , CNET with no spaces between the symbols.
In the script we now seperate this using the explode function which splits the string into an array using a delimiter , in this case commas . This line looks like this

$symbol = explode("," , $symbol);

We then loop through all of the symbols using a for next loop , here is the for statement in our new example .

for ($i=0 ; $i < sizeof($symbol) ; $i++)
{
print "<br>";
?>
<img border="0" src="http://ichart.yahoo.com/t?s=<?php print $symbol[$i]; ?>">
<br>
<?php
next;
}
?>

You can get the whole script by viewing the following file and cutting and pasting it .multistock.txt

 




Books
 Sponsors
 Random Code
Atomic time(date and time)
Reverse sort(functions)
Email verify function(internet)
 Random Article
  Network
Programming resources
Tutorials directory
Clickbank mall
sell software
Free auctions, low cost stores
UK products
US products
Gambling directory
Sexy free wallpapers
Hosting resources
ASP site
DVD site
Domain names
Dating site
Software directory
Maxi directory
bigarticle : free articles




beginners PHP Copyright © 2004 onwards by beginnersPHP.