There is a form. It has text area,a text field and an upload image option.
I want that if the user writes some paragraph and wants the image to be displayed exactly above next paragraph, then he/she write a unique keyword like ‘imagehere’ in text area as well as in text field.
this unique text would be stored in another column.
Then while retriving the text from database, if there is such keyword then replace it with
<img src="path">
tag
Is this correct way to display images according to position defined by user?
It works!
I wanted to do this to avoid asking the user to write
in textarea.
So if the user writes specific keyword then
by using
str_replace, you can easily replace the specific keyword with
img src tag
and these images are displayed.