回声阵列常规文本 [英] Echo arrays with regular text

查看:87
本文介绍了回声阵列常规文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么会写这篇文章,所以我只使用一个回音?

How would I write this so I'm only using one echo?

echo "<div class='post'>";
echo $row['title'];
echo "</div>";

我使用一个数组来呼应出表的值,但将是一个更容易对眼睛,如果我能组合到一条echo语句。然而,当我尝试到页面变成空白。

I'm using an array to echo out a table's values but it would be a lot easier on the eyes if I could combine these into one echo statement. However, when I try to the page goes blank.

推荐答案

方括号括起来的数组引用:

Enclose the array reference in brackets:

echo "<div class='post'{$row['title']}</div>";

这篇关于回声阵列常规文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆