我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

相当复杂的PHP到Twig字符串转换

I have a string I'm having trouble converting to twig, I've already tried the PHP to twig converters and am having no luck. Any ideas on how to format this in twig?

<?php $string = strtr($model, array('-R' => '', '-r' => '', ' ' => '', '-reconditioned' => ''));  ?>

The filter replace uses strt as underlaying function, as seen in the source of twig

 {{ example | replace({ '-r': '', '-R': '', '-reconditioned': '',}) }} 

近期文章

  • 将拖动的路线数据从Google地图中删除
  • 从表单将数据推送到MySQL数据库
  • 适当集成php + oracle + active目录
  • 为什么jpg文件在laravel 5.1中保存为tmp
  • 划分数组并保存在变量php中
  • 如何在循环symfony中运行迁移命令?
  • Laravel app中更新余额的问题
  • XAMPP 32位错误,一体化迁移
  • 如果在ajax中选中了复选框,该怎么读?
  • 从不同的文件夹上传多个文件
  • wordpress中的Bootstrap列自定义
  • PHP Wordpress将XML导出到自定义网站
  • JSON foreach循环将数据写入文件两次
  • Preg_match返回阵列位置中的两个单词
  • PHP JSON响应以字符串值开头
  • PHP mb_convert_encoding不适用于查询
  • 如何使用symfony环境dev和prod
  • Imagick的'thumbnailImage'功能不起作用
  • 我在哪里可以找到示例PHP MVC应用程序? [关闭]
  • 如何从下周的某天在php中获取日期

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华