i am trying to insert an image url into long text in laravel blade file but how to split the text int two equal parts and insert the image in the center of the text
i use str_split but it spit the text to many parts, can anyone help please ??
i am trying to insert an image url into long text in laravel blade file but how to split the text int two equal parts and insert the image in the center of the text
i use str_split but it spit the text to many parts, can anyone help please ??
2
Answers
Find the answer with the example of code:
In this example, the image URL will be inserted at the center of the long text. You can adjust the position or modify the code as per your specific requirements.
Make sure to replace $longText with your actual long text variable and $imageUrl with the URL of your desired image.
I don’t get what you want exactly, but this may can help you: