1
How to include a constant in a given array key. Example:
Unchanged array:
array (size=3)
0 =>
array (size=3)
'id' => string '1' (length=1)
'image' => string '1.jpg' (length=5)
'carro' => string 'bmw' (length=12)
1 =>
array (size=3)
'id' => string '2' (length=1)
'image' => string '2.jpg' (length=5)
'carro' => string 'mercedes' (length=17)
2 =>
array (size=3)
'id' => string '3' (length=1)
'image' => string '3.jpg' (length=5)
'carro' => string 'bentley' (length=9)
Array with change:
array (size=3)
0 =>
array (size=3)
'id' => string '1' (length=1)
'image' => string 'http://exemplo.com/1.jpg' (length=5)
'carro' => string 'bmw' (length=12)
1 =>
array (size=3)
'id' => string '2' (length=1)
'image' => string 'http://exemplo.com/2.jpg' (length=5)
'carro' => string 'mercedes' (length=17)
2 =>
array (size=3)
'id' => string '3' (length=1)
'image' => string 'http://exemplo.com/3.jpg' (length=5)
'carro' => string 'bentley' (length=9)
What is the constant and in which key?
– Woss
What you want is to build the url of the image prefixed
http://www.exemplo.com/
in every fieldimage
?– Isac
At what point does this constant go into action? or does it have to scan this array and assign? your question is incomplete could explain these points.
– novic