Add variable to array without using array push

This is were we discuss the development of Bayanihan.

Add variable to array without using array push

Postby konetkar500 » Sun Feb 11, 2018 10:12 pm

Hi

I want to add to a variable to the end of an array without the overhead of calling array_push. This is my code:

$sklabels = array ();
for( $count = 0 ; $count < 44; $count++)
{
$j = "sk" . $count;
array_push( $sklabels, $j );
}

Please will you give me example code that doesn’t use array_push?
I would like to use thi s for my project ( http://www.360social.ae/ourpackages/ )

Thanks in advance.
konetkar500
 
Posts: 5
Joined: Wed Jun 22, 2011 7:26 pm

Return to Development



Who is online

Users browsing this forum: No registered users and 1 guest

cron