php - 用 CSS 隐藏 PHP 变量
问题描述
在任何地方都找不到答案,我确信它就在那里,但我可以看到它!
我试图通过 CSS(或任何其他方式)隐藏后缀变量。我只是从代码中删除了它,但由于某种原因它破坏了整个网站。
代码是
if (count($redq_product_inventory)) {
$price_html = '<span class="amount rnb_price_unit_' . $product_id . '"> ' . $prefix . ' ' . $range . ' ' . $suffix . '</span>';
update_post_meta($product_id, '_price', $price);
} else {
$price_html = sprintf(__('You don\'t have any inventory with this product. This product in not bookable.', 'redq-rental'));
}
谢谢!
解决方案
从该 PHP 代码中删除变量不应破坏该站点。当你删除它时,也许只是有一些小错误。该代码行应该是:
$price_html = '<span class="amount rnb_price_unit_' . $product_id . '"> ' . $prefix . ' ' . $range . '</span>';
(我想你不需要最后一个用于andnbsp;
之间的空间,所以我也删除了它。)$range
$suffix
推荐阅读
- android - 无法合并dex,Android项目构建失败
- typescript - 高图表 - 显示多个图表的系列数据
- arrays - Bash用变量定义向量
- html - 如何在小容器中显示高分辨率的网络摄像头
- java - 导入外部 JAR Eclipse
- javascript - 处理未定义的ajax数据的替代方法
- actions-on-google - 在 Python 中使用 AWS lambda 对 Google Smart Home 执行操作
- javascript - chrome 中的 net::ERR_SPDY_PROTOCOL_ERROR
- asp.net - 在 ASP.NET Core 2.1 中,使用外部登录提供程序的身份,ExternalLogin 方法是否应该仅是 POST?
- r - R中的向量化余弦相似度计算