Jump to content

foreach,if..else brackets in php and in html


medicalboy

Recommended Posts

can anyone explain why we write the forech loop or if else statements in php like that

<?phpif() {}foreach(array as value) {}?>

and in html, we don't use the {} brackets and replace it with :

<?phpif() :else :foreach(array as value) :}?>

and if there is a related source for this point, i'll appreciated!

Link to comment
Share on other sites

HTML? :)HTML is not a programming language. (at least not in the classical sense). Could you elaborate on what you're trying to do?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...