我用PHP编程,但我不认为它是正确的。
我编写了这样的东西:
<?php
$apple = 10
if(apple >= 4){
?>
<img src="Bladieblabla">
<a href="Bladieblabla.bla">Biep</a>
<?php
}else{
print "Awhh we don't have 4 apples";
}
?>
答案 0 :(得分:0)
if($apple > 5) {
echo '<img src="Bladieblabla">';
echo '<a href="Bladieblabla.bla">Biep</a>';
} else {
print "Awhh we don't have 4 apples";
}
更新:仅使用echo
一次:
echo '<img src="Bladieblabla">
<a href="Bladieblabla.bla">Biep</a>';
答案 1 :(得分:0)
<?php
$apple = 10;
if(apple > 5){
echo '<img src="Bladieblabla">';
echo '<a href="Bladieblabla.bla">Biep</a>';
}else{
print "Awhh we don't have 4 apples";
}
?>