I stuck with a problem: I have an array with IDs and want to assign theses IDs to a key of a associative array:
$newlinkcats = array( 'link_id' => $linkcatarray[0], $linkcatarray[1], $linkcatarray[2]);
this works fine, but I don't know how many entries in $linkcatarray. So I would like to loop or similar. But I don't know how.
- no push, cause it is no array
- no implode, cause it is no string
- no =, cause it overrides the value before
Could anyone help?
Thanks Jim
$newlinkcats = array('link_id' => $linkcatarray);