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
Explain strftime() function in perl?
You want to read command-line arguements with perl. How would you do that?
Explain USE and REQUIREMENT statements?
Explain lexical variables.
Explain the meaning of subroutine?
What are the various flags/arguments that can be used while executing a perl program?
Explain what is the scalar data and scalar variables in Perl?
What is eval function in perl?
how to connect cisco switch uisng perl script
How to convert strings into an array in perl?
what is Polymorphism in Perl?
Can inheritance be used in perl?
Explain socket programming in perl?
what are the steps involved in reading a cgi script on the server?
what are the two ways to get private values inside a subroutine or block?