如何解决将php行转换为树枝
嗨,我有这个php代码:
<p style="text-align: center;">Showing urns for a <?php echo $person_or_animal; if( $ashes_size=='small' ){ echo ' that holds a small amount of ashes.'; }else{ echo ' '.$pp_weight; ?> cubic inches and larger. <?php } ?> <a href="<?php echo $home_url; ?>">Start over?</a></p>
我像这样转换成树枝:
<p style="text-align: center;">Showing urns for a {{ person_or_animal }} {% if ashes_size is 'small' %} {{ ' that holds a small amount of ashes.' }} {% endif %}{% else %} {{ ' '~pp_weight }} cubic inches and larger. <a href="<?php echo $home_url; ?>">Start over?</a></p>
但是当我访问页面时,我得到了:
致命错误:“值“ small”(“名称” 预期)在“默认/模板/扩展名/模块/urnfindersearch.twig”中 在第12行。'
知道发生这种情况的原因吗?因为我不是树枝专家,所以如果有人可以帮助我,那就太好了。
谢谢 亚伦
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。