[英]Add math variable into wordwrap
我需要在每個包裝中添加$y + 40
的變量。 我似乎無法一生解決這個問題。 還有其他人有有效的方法嗎?
注意:這是使用單詞自動換行,而不是while循環。
$y = 150;
while(the_repeater_field('unordered_list')):
$start = '<text y="'.$y + 40.'" x="172" class="bullet">•';
$text = $start.wordwrap(get_sub_field('list_item'), 10, "</text>".$start, 0); ?>
echo str_replace(array("<strong>","</strong>"), array("<tspan y='". $y ."' x='172' font-weight='bold'>","</tspan>"), $text);
endwhile;
嘗試在evey php標簽而不是(')處更改(“)
$start = "<text y='".$y + 40.:' x='172' class='bullet'>•";
II
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.