Click here to Skip to main content
15,171,053 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Everyone! I want put it a class to an echo(IN PHP). For give him styles.. but I dont know how, and I try but, spear this error:

Parse error: syntax error, unexpected 'video' (T_STRING) in C:\xampp\htdocs\clinica\index.php on line 42


and this is my code:
echo('<iframe width="1000" height="515" src="'.$fila['url'].'" frameborder="5" allow="autoplay;
encrypted-media" allowfullscreen class="'video'"></iframe>');

What I have tried:

Some thing, but nothing.. Either is what I Am a master in php ;(
Posted
Updated 12-Nov-21 7:45am

1 solution

Quotes delimit strings: it a string starts with a single quote, it also ends with a single quote. Your class element contains single quotes, so the system tries to work out what you are saying:
PHP
str = '...'video'...';

And fails to understand.
If you want the word video in the string, remove the quotes:
PHP
echo('<iframe width="1000" height="515" src="'.$fila['url'].'" frameborder="5" allow="autoplay;
encrypted-media" allowfullscreen class="video"></iframe>');
If you want something else, you need to work out exactly what first!
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900