spacer
spacer search

i-Vibe.com
developer resource & tips portal

Search
spacer
Newsflash
01/27/06: I just had some time to cleanup this website. I will add more articles for AJAX this coming weekend.
 
highway.jpg
Main Menu
Home
Articles
Programming
Networking/Security
Data Modeling
Interface Design
Developer News
Downloads
Links
Login





Lost Password?
No account yet? Register
Related Articles
 
Home arrow Programming arrow PHP arrow PHP Array
PHP Array Print E-mail
  • Currently 2.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Rating: 2.0/5 (4 votes cast)

Written by Roceller Alvarez   
Saturday, 26 February 2005
Here’s a quick code sample that demonstrate a qucik way in using an array in PHP.
<?
$category = array(
1=> "option1",
2=> "option2",
3=> "option3"
);
$category = str_replace(" ", " ", $category);

echo ‘<SELECT name=category>’;
foreach ($category as $key => $value)
{
echo ‘<OPTION value=’.$value.’> ‘.$value.'’;
}
echo ‘</select>’;
?>

Comments

Only registered users can write comments.
Please login or register.

Powered by AkoComment 2.0!

 
Next >
spacer
 
spacer