This is a discussion on Using Arrays in PHP within the PHP Programming forums, part of the Web Development category; HI, What is the difference of using count() and sizeof() in counting array values?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Well, there's no difference at all. Sizeof() is an alias of Count(). |
| |||
| Hi Explizite, There is some difference there, just check it below, They can both be used to count the number of items in an array but does one do it better? sizeof vs count sizeof: 3.75928902626 seconds count: 3.33035206795 seconds Time saved: 0.428936958313 seconds; 12.8796280262% The evidence says yes. The count function was over 12% faster in this test. Both functions are fast though taking 3-4 microseconds to count an array with 100,000 items. You might think it isn't worth it but remember count is also a character shorter. Not only is it faster to run but it is also faster to type!
__________________ Thanks & Regards Sabari... |
| |||
| array_push array_push -- Push one or more elements onto the end of array Example: array_push() $stack = array ("orange", "banana"); array_push ($stack, "apple", "raspberry"); This example would result in $stack having the following elements: Array ( [0] => orange [1] => banana [2] => apple [3] => raspberry ) |
| |||
| want to know more about php websites please any one can help Keyword Research Georgia Health Insurance |
| |||
| Arrays fall under the same category that a lot of concepts in PHP do: "Difficult to understand at first, easy to use once you do, and impossible to live without." In this article, we will be taking a look at why they are so important to program development, and explore how to work with them. You will also learn how you can write a random link generator using arrays, and expand it to display banners or buttons associated with the links. __________________________________________________ ____________________ Keyword Research Georgia Health Insurance |
| |||
| PHP supports both simple and multi-dimensional arrays. ... array_combine(), Creates an array by using one array for keys and another for its values, 5 ... __________________________________________________ __________- top hosting company cheap web hosting |
| |||
| rays fall under the same category that a lot of concepts in PHP do: "Difficult to understand at first, easy to use once you do, and impossible to live without." In this article, we will be taking a look at why they are so important to program development, and explore how to work with them. You will also learn how you can write a random link generator using arrays, and expand it to display banners or buttons associated with the links. ---------------------------- Arbejdsborde Self Certificate Mortgage |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/php-programming/3298-using-arrays-php.html | |||
| Posted By | For | Type | Date |
| mrajendhran's bookmarks tagged with | This thread | Refback | 08-30-2007 01:04 PM |
| DiscussWeb IT Community - Technical Support and Technology Discussions | This thread | Refback | 08-23-2007 10:11 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Jagged Arrays in C# | vigneshgets | C# Programming | 4 | 09-30-2008 04:48 AM |
| Classic asp arrays and recordset | ramesh123 | ASP and ASP.NET Programming | 1 | 12-02-2007 08:44 PM |
| Using arrays in stored procedures | oxygen | Database Support | 1 | 11-26-2007 08:01 AM |
| Arrays in Java | leoraja8 | Java Programming | 7 | 11-19-2007 01:23 AM |
| Java:Tutorial - Arrays | pranky | Java Programming | 0 | 02-24-2007 12:54 AM |