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
What is subroutine in perl?
What is the purpose of “_file_ literal” and “_line_ literal” in perl?
Explain chop?
What are the logical operators used for small scale operations?
What is the different between array and hash in perl programming?
How do I generate a list of all .html files in a directory?
What does Perl do if you try to exploit the execve(2) race involving setuid scripts?
Define operators used in perl?
Define dynamic scoping.
What does this symbol mean '->'?
How to check the status of airplane mode (enable/disable) in perl for Android mobile?
What is q (single q) operator in perl?
Demonstrate subroutines in perl with a simple example.
What does file test operators do in perl?
What are the advantages of c over Perl?