Can someone please help me fix this code up? I am getting some weird error:
this for loop not working properly
<?php
$languages=array('te','hi');
for($langIndex=0;$langIndex<count($languages);$langIndex++)
{
echo $languages;}
?>
expected result:
te,hi
actual result:
Array Array
you have to get the array-entry for the iteration first (
$languages[$langIndex]):another possibility would be to use a foreach-loop: