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 the purpose of _package_ literal?
If you want to empty an array then how would you do that?
Explain USE and REQUIREMENT statements?
What is perl I used for?
What interface used in PERL to connect to database? How do you connect to database in Perl?
In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?
what are steps to do to lock the sony ericsson mobile with password?
List all the features of perl programming?
What are stdin, stdout and stderr?
What is automatic error handling in perl?
How do I pass a command line argument in perl?
Why Perl aliases are considered to be faster than references?
What is the peculiarity of returning values by subroutines in perl?
What is it meants by '$_'?
What are the different string manipulation operators in perl?