homepage Welcome to WebmasterWorld Guest from 54.166.159.110
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Array set to empty
So many array functions
HeadBut

10+ Year Member



 
Msg#: 3103145 posted 7:10 am on Sep 30, 2006 (gmt 0)

Just want to empty an array:
$ILoveSushi[] = ""; seems to add an empty index. How do I make the whole array empty?

 

Birdman

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3103145 posted 3:53 pm on Sep 30, 2006 (gmt 0)

You can do this:

$ILoveSushi = NULL;

or

unset($ILoveSushi);

...or, if you want to keep the variable as an array but completely empty it, do this:

$ILoveSushi = array();

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved