Jump to content

Recommended Posts

<?php
if(isset($codes3)) {
// execture that it does have a value
} else {
// It does not have a value
}
?>

 

I am new so can you please write this code include with my code...

 

I tried like this

 

<?php if(isset($codes3)) {
'<div id="detaildisplay_box"> echo $code3; </div>' ;
}
else {
'<div id="detaildisplay_box"> echo "No Value!" </div>';
}
?>

 

But its not working

Edited by arunpatal
Link to comment
https://forums.phpfreaks.com/topic/270725-if-value-exists/#findComment-1392610
Share on other sites

Sigh...It's not hard at all. In fact I shouldn't really even do it if you don't even know the echo function. I suggest going http://www.w3schools...php/default.asp for a good start. But I suppose I'll help anyways:

<?php
if(isset($codes3)) {
echo "
<br />
<div id='codedisplay_box' style='overflow: auto;'><code><xmp> $codes3</xmp></code></div>
<br />";
}
?>

Edited by SocialCloud
Link to comment
https://forums.phpfreaks.com/topic/270725-if-value-exists/#findComment-1392611
Share on other sites

Sigh...It's not hard at all. In fact I shouldn't really even do it if you don't even know the echo function. I suggest going http://www.w3schools...php/default.asp for a good start. But I suppose I'll help anyways:

<?php
if(isset($codes3)) {
echo "
<br />
<div id='codedisplay_box' style='overflow: auto;'><code><xmp> $codes3</xmp></code></div>
<br />";
}
?>

 

Thanks for help (it just work nice)

 

Can you check if this also should be fine

 

<?php if(isset($codes3)) {
'<div id="detaildisplay_box"> echo $code3; </div>' ;
}
else {
'<div id="detaildisplay_box"> echo "No Value!" </div>';
}
?>

Edited by arunpatal
Link to comment
https://forums.phpfreaks.com/topic/270725-if-value-exists/#findComment-1392612
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.