lundi 13 février 2017

PHP: How to push an array into a 2D array?

Vote count: 0

In Perl, we could do like this:

foreach (....) {
   ..........
   ..........
   ..........
   my @tmp = ($x1,$x2,$y1,$y2);
   push(@target_array,\@tmp);  # Don't know how to translate this line to PHP, failed after several try with array_push
}

How to translate this into PHP?

asked 42 secs ago

Let's block ads! (Why?)



PHP: How to push an array into a 2D array?

Aucun commentaire:

Enregistrer un commentaire