PHP within echo [closed] - php

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
echo '<div class"Match-box" align="center">'.$Voornaam_array[$n]. '<br>' .$Tweedenaam_array[$n]. '<br>' .$Achternaam_array[$n].
'<br><br><a href="INSERT LINK TO DETERMINED PLACE" class="Match-button">'.$Voornaam_array[$n].' toevoegen aan matches<a><br><br></div>' ;
So this is my php code snippet, in which I want the link to be determined by php code(I want to run a query between the ""). The arrays displayed only contain text.
How can I make this working?
Any help is appreciated!
Thanks in advance,

You can do different things when in this situation but here is one.
'<br><br><a href="'. $var .'" class="Match-button">'

Related

Why PHP cannot execute the echo "<?"? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
Can some of you tell me please why when I echo "<?", the <? is not displayed?
I'm sorry, maybe it's very stupid question, but I need to dig this language more deeper.
If you view the source it will be there. Its because the browser thinks its a tag.
Fix it by using htmlentities().
echo htmlentities("<?");

Echo not displaying the whole string [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 7 years ago.
Improve this question
I have this code.
<?php echo "".$row['pname']."";?></h4>
When I click on the link,Its only posting the first word of the string,the rest are ignored
Missing the quotes for href attribute -
echo "<a href='pvendors.php?post=".$par."'>".$row['pname']."</a>";

how to $_GET when it has a ' in the text [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I pass a variable called txt from one query on a web page to another web page using
<?php echo $_GET['txt'];?>
the problem some time the text will have a word like don't in it. the (') causes things to just stop. I need to output the variable as read from the database which would include any text that was in the field
When using $_GET you should use urlencode() and urldecode().

Image doesn't show [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I have written the correct image source/folder but the image is not displayed. Did I miss something?
echo '<div class="product-thumb"><img src="images/menu/'.$obj->MenuPicture.'"></div>';
Change
<img src="images/menu/'.$obj->MenuPicture.'">
to
<img src="'.$obj->MenuPicture.'" />
I addedd the "/" at the end of the tag for W3C compliance.

Coding Help Regarding Meta Tag And Site Title [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
Hello Guys I need a small help pls Check this code
print ' File Name: '.translit($file).' Video Song
in this code .translit($file). is name of my file and i want to show this file name in my site page title meta tag and also in meta keywords..
and when i am adding this code into
echo "<title>.translit($file). </title>";
it showing code as it is..
m newbie pls givvme sloution of this
You just need to close the strings before concatenating them ie:
echo "<title>".translit($file)."</title>";

Categories