Reputation: 47
Im trying to do this
$input = "<img src="HTML/images/user.png" alt="" />";
but it does not work out, i know im supposed to put a / before a " or something please help
Upvotes: 2
Views: 915
Reputation: 27364
all you need to do is escape double quote.
just like below.
\"HTML/images/user.png\" alt=\"\"
Upvotes: 1
Reputation: 779
Note that you have use "
for PHP already.
You can either choose to use '
or \"
.
For example,
$input = "<img src='HTML/images/user.png' alt='' />";
$input = "<img src=\"HTML/images/user.png\" alt=\"\" />";
Upvotes: 0
Reputation: 2288
Try this
$input = "<img src='HTML/images/user.png' alt='' />";
Or
$input = "<img src=\"HTML/images/user.png\" alt=\"\" />";
Upvotes: 4