For example I was expecting
<?php echo 'this is my name:'.my_name();?>
to be transpiled to
This is {{my_name()}}
I see now using a different control structure might solve the problem. Because this is happening inside a PHP code block.
My current code:
<?php
if (!$category_as_link)
{
echo $this->ad_model->adCategoryString($ad);
} else
{
echo $this->ad_model->category_link($ad);
}
?>
The output from PHP2Blade is just an entire @php codeblock
@php if (!$category_as_link)
{
echo $ci->ad_model->adCategoryString($ad);
} else
{
echo $ci->ad_model->category_link($ad);
}
@endphp
I will try the alternative control structure syntax which you mention in the previous issue, this means adding a LOT of opening and closing PHP tags to my current code unfortunately, I imagine so:
<?php if (!$category_as_link): ?>
<?php echo $this->ad_model->adCategoryString($ad); ?>
<?php else: ?>
<?php $this->ad_model->category_link($ad); ?>
<?php endelse; ?>
For example I was expecting
<?php echo 'this is my name:'.my_name();?>to be transpiled to
This is {{my_name()}}I see now using a different control structure might solve the problem. Because this is happening inside a PHP code block.
My current code:
The output from PHP2Blade is just an entire @php codeblock
I will try the alternative control structure syntax which you mention in the previous issue, this means adding a LOT of opening and closing PHP tags to my current code unfortunately, I imagine so: