I wish to add a div class INSIDE of this echo:
<?php echo get_image(); ?>
Not sure what I am doing wrong. The div class must be inside (wrapper is no good). Any suggestions?
Here are some examples of what I’ve tried (none work):
<?php echo '<div class=mydiv>' get_image(); ? '</div>'>
<?php echo '<div class=mydiv>' .get_image();. '</div>' ?>
Thank you!
Remove the semicolon after get_image function, also add the double quotes for classes name as echo is started with single quote.
First thing is, you can’t use semi-colon(;) in the echo method, if you are using another method inside it. For that you can use this code:
PHP
If it gets more easy, you also can also do: