What is the difference between for & foreach, exec &
system?
Answer Posted / raj
Ofcourse the syntax is completely different but the only
difference is
foreach simply gives an easy way to iterate over arrays.
foreach works only on arrays,
and will issue an error when you try to use it on a variable
with a different data type or an uninitialized variable
where as for loop works on the count length or what ever
please look in to php.net site for reference.
Thanks,
Raj
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
Write the program to process a list of numbers.
Why should I use the -w argument with my Perl programs?
what is the difference between java and cgi?
What is the difference between use and require in perl programming?
What does undef function in perl?
Define dynamic scoping.
How to concatenate strings in perl?
What are hashes?
What is a perl references?
Explain the functioning of conditional structures in perl.
What is confess function in perl?
How can you replace the characters from a string and save the number of replacements?
What is the importance of perl warnings?
What are the advantages and disadvantages of perl language?
Remove the duplicate data from @array=(“perl”,”php”,”perl”,”asp”)