buenas quisiera saber como poder hacer dinamico con un for para 50 entradas randon de este array:
$tags = array(
array(
"tag_uid" => $friends[$random]['id'],
"x" => 0,
"y" => 1
),
array(
"tag_uid" => $friends[$random]['id'],
"x" => 0,
"y" => 1
)
);
Esa es para dos personas como podria hacerlo dinamicamente ???
Podes usar el bucle For (http://php.net/manual/es/control-structures.for.php) de PHP, algo asi:
<?php
$tags = array();
for($i=50; $i>0; $i--)
{
$tags[] = array(
"tag_uid" => $friends[$random]['id'],
"x" => 0,
"y" => 1
);
}
?>