how can i write this in substring with phalcon
{{blog.description}}
plz help me.
Can you explain more ? I don't know what you want to do.
i want ot view my description in upto 200 char. like this. <?php echo mb_strimwidth("Hello World", 0, 10, "..."); ?>
but don't know. how to show it with phalcon.
i'm print my description in this system.
You can add mb_strimwidth as a Volt function, but the simplest might be to just use plain PHP in your Volt template - that is possible. {{blog.description}}, when referenced in straight PHP is $blog->description.
mb_strimwidth
$blog->description
Check this out: https://docs.phalcon.io/en/latest/reference/volt.html#id1
solution for substring....
<?php if($blog->description) { echo substr($blog->description, 0,200); } ?>