There is a certain operator ->, which allows the use of methods of a particular class. The php file contains approximately the following code:
<?php // ΠΠ΄Π΅ΡΡ ΠΈΠ΄ΡΡ ΠΈΠ½ΠΈΡΠΈΠ°Π»ΠΈΠ·Π°ΡΠΈΡ ΠΠ ?> <table> <thead> <tr> <th>Π¨Π°ΠΏΠΊΠ°1</th> <th>Π¨Π°ΠΏΠΊΠ°2</th> </tr> </thead> <tbody> <?php $foo = Class->method; // ΠΠ΄Π΅ΡΡ ΠΈΠ΄ΡΡ ΠΏΡΠΈΡΠ²ΠΎΠ΅Π½ΠΈΠ΅ ΡΠ°Π±Π»ΠΈΡΡ ΠΈΠ· Π±Π΄ ΠΏΠ΅ΡΠ΅ΠΌΠ΅Π½Π½ΠΎΠΉ $foo, ΠΏΡΠΈΡΠ΅ΠΌ ΡΠ°Π±Π»ΠΈΡΠ° ΠΏΠ΅ΡΠ΅Π΄Π°Π΅ΡΡΡ ΠΊΠ°ΠΊ ΠΌΠ°ΡΡΠΈΠ² foreach($foo as $element){ $head1 = $element['head1']; $head2 = $element['head2']; echo "<tr><td>".$head1; echo "</td><td>".$head2; echo "</td></tr>"; } ?> </tbody> </table> The conclusion of this is the following:
method; foreach($foo as $element){ $head1 = $element['head1']; $head2 = $element['head2']; echo ""; } ?> And then the table is drawn, with a header, as it should, and the contents are two cells on one line, the contents of the first:
".$head1; echo " ... and the second:
".$head2; echo " As far as I understand, the point is in the operator ->, which is used in html for commenting, and in php to call the class methods. How to fix this?
And, and if someone has a desire to advise me to make a request through ajax to retrieve the contents of the table: it does not knock, I need this way.
$element['head1']and$element['head2']? - Bookin<tr><td>a.$head1; echo.$head1; echo- Bookin