Don't print blank lines when data fields are empty
up vote
0
down vote
favorite
Using Wordpress woocommerce theme.Result leaves a empty space if form field is left blank.I Don't want to print blank lines when input data fields of a form are empty.So if QC and QO in form are left blank it prints blank space in output form.Check image
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( $feild1 ) )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( $feild2 ) )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( $feild3 ) )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( $feild4 ) )
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
#where feild xxx=get_post_meta($post->ID,'_input_feild xxx', TRUE );
and
is it better to delete meta value from post if left blank as DB can be
full of blank meta data.Should we delete meta_value with empty or null
value.will it effect anything.
css wordpress forms woocommerce
add a comment |
up vote
0
down vote
favorite
Using Wordpress woocommerce theme.Result leaves a empty space if form field is left blank.I Don't want to print blank lines when input data fields of a form are empty.So if QC and QO in form are left blank it prints blank space in output form.Check image
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( $feild1 ) )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( $feild2 ) )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( $feild3 ) )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( $feild4 ) )
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
#where feild xxx=get_post_meta($post->ID,'_input_feild xxx', TRUE );
and
is it better to delete meta value from post if left blank as DB can be
full of blank meta data.Should we delete meta_value with empty or null
value.will it effect anything.
css wordpress forms woocommerce
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Using Wordpress woocommerce theme.Result leaves a empty space if form field is left blank.I Don't want to print blank lines when input data fields of a form are empty.So if QC and QO in form are left blank it prints blank space in output form.Check image
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( $feild1 ) )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( $feild2 ) )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( $feild3 ) )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( $feild4 ) )
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
#where feild xxx=get_post_meta($post->ID,'_input_feild xxx', TRUE );
and
is it better to delete meta value from post if left blank as DB can be
full of blank meta data.Should we delete meta_value with empty or null
value.will it effect anything.
css wordpress forms woocommerce
Using Wordpress woocommerce theme.Result leaves a empty space if form field is left blank.I Don't want to print blank lines when input data fields of a form are empty.So if QC and QO in form are left blank it prints blank space in output form.Check image
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( $feild1 ) )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( $feild2 ) )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( $feild3 ) )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( $feild4 ) )
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
#where feild xxx=get_post_meta($post->ID,'_input_feild xxx', TRUE );
and
is it better to delete meta value from post if left blank as DB can be
full of blank meta data.Should we delete meta_value with empty or null
value.will it effect anything.
css wordpress forms woocommerce
css wordpress forms woocommerce
edited Nov 22 at 6:13
asked Nov 22 at 4:42
Ferna
176
176
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
Try this code
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( stripslashes($feild1) ) )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild2) ) )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild3) ) )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild4) ) )
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
Try this css
.acc-t ul{
margin-bottom:0px !important;
margin-top:0px !important;
}
No it doesnt work
– Ferna
Nov 22 at 5:55
all feilds still have blank output.any other solution
– Ferna
Nov 22 at 6:33
use var_dump to print$feild2
value ans share me here
– Vel
Nov 22 at 7:10
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1127:string '' (length=0) ......its a code which i uploaded in form of plugin by name custom
– Ferna
Nov 22 at 7:34
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1123:string 'test' (length=4) this is for $feild1
– Ferna
Nov 22 at 7:44
|
show 2 more comments
up vote
0
down vote
You can use this as well. Give it a try if this works...
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( $feild1 ) && strlen($feild1) > 0 )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( $feild2 ) && strlen($feild2) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( $feild3 ) && strlen($feild3) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( $feild4 ) && strlen($feild4) > 0)
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
no it doesnt work.it shows as blank space
– Ferna
Nov 22 at 8:52
do an echo inside the if condition where it the black space is coming.... let me know the output
– OneJeet
Nov 22 at 9:17
{ echo "Have a good day!"; }else { echo 'good day"'; } no error
– Ferna
Nov 22 at 10:09
Not clear. please echo the respective field value inside if for which the field value expected to be empty
– OneJeet
Nov 22 at 10:18
didn't get you ,it is still showing blank.so....if ! empty then results are displayed and if empty results are not displayed which i am expecting but it displays blank space of field 2 n 3
– Ferna
Nov 22 at 10:49
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Try this code
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( stripslashes($feild1) ) )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild2) ) )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild3) ) )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild4) ) )
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
Try this css
.acc-t ul{
margin-bottom:0px !important;
margin-top:0px !important;
}
No it doesnt work
– Ferna
Nov 22 at 5:55
all feilds still have blank output.any other solution
– Ferna
Nov 22 at 6:33
use var_dump to print$feild2
value ans share me here
– Vel
Nov 22 at 7:10
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1127:string '' (length=0) ......its a code which i uploaded in form of plugin by name custom
– Ferna
Nov 22 at 7:34
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1123:string 'test' (length=4) this is for $feild1
– Ferna
Nov 22 at 7:44
|
show 2 more comments
up vote
0
down vote
Try this code
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( stripslashes($feild1) ) )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild2) ) )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild3) ) )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild4) ) )
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
Try this css
.acc-t ul{
margin-bottom:0px !important;
margin-top:0px !important;
}
No it doesnt work
– Ferna
Nov 22 at 5:55
all feilds still have blank output.any other solution
– Ferna
Nov 22 at 6:33
use var_dump to print$feild2
value ans share me here
– Vel
Nov 22 at 7:10
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1127:string '' (length=0) ......its a code which i uploaded in form of plugin by name custom
– Ferna
Nov 22 at 7:34
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1123:string 'test' (length=4) this is for $feild1
– Ferna
Nov 22 at 7:44
|
show 2 more comments
up vote
0
down vote
up vote
0
down vote
Try this code
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( stripslashes($feild1) ) )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild2) ) )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild3) ) )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild4) ) )
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
Try this css
.acc-t ul{
margin-bottom:0px !important;
margin-top:0px !important;
}
Try this code
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( stripslashes($feild1) ) )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild2) ) )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild3) ) )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( stripslashes($feild4) ) )
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
Try this css
.acc-t ul{
margin-bottom:0px !important;
margin-top:0px !important;
}
edited Nov 22 at 8:04
answered Nov 22 at 5:36
Vel
6,02941843
6,02941843
No it doesnt work
– Ferna
Nov 22 at 5:55
all feilds still have blank output.any other solution
– Ferna
Nov 22 at 6:33
use var_dump to print$feild2
value ans share me here
– Vel
Nov 22 at 7:10
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1127:string '' (length=0) ......its a code which i uploaded in form of plugin by name custom
– Ferna
Nov 22 at 7:34
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1123:string 'test' (length=4) this is for $feild1
– Ferna
Nov 22 at 7:44
|
show 2 more comments
No it doesnt work
– Ferna
Nov 22 at 5:55
all feilds still have blank output.any other solution
– Ferna
Nov 22 at 6:33
use var_dump to print$feild2
value ans share me here
– Vel
Nov 22 at 7:10
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1127:string '' (length=0) ......its a code which i uploaded in form of plugin by name custom
– Ferna
Nov 22 at 7:34
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1123:string 'test' (length=4) this is for $feild1
– Ferna
Nov 22 at 7:44
No it doesnt work
– Ferna
Nov 22 at 5:55
No it doesnt work
– Ferna
Nov 22 at 5:55
all feilds still have blank output.any other solution
– Ferna
Nov 22 at 6:33
all feilds still have blank output.any other solution
– Ferna
Nov 22 at 6:33
use var_dump to print
$feild2
value ans share me here– Vel
Nov 22 at 7:10
use var_dump to print
$feild2
value ans share me here– Vel
Nov 22 at 7:10
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1127:string '' (length=0) ......its a code which i uploaded in form of plugin by name custom
– Ferna
Nov 22 at 7:34
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1127:string '' (length=0) ......its a code which i uploaded in form of plugin by name custom
– Ferna
Nov 22 at 7:34
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1123:string 'test' (length=4) this is for $feild1
– Ferna
Nov 22 at 7:44
C:wampwwwwordpresswp-contentpluginscustomcustom.php:1123:string 'test' (length=4) this is for $feild1
– Ferna
Nov 22 at 7:44
|
show 2 more comments
up vote
0
down vote
You can use this as well. Give it a try if this works...
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( $feild1 ) && strlen($feild1) > 0 )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( $feild2 ) && strlen($feild2) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( $feild3 ) && strlen($feild3) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( $feild4 ) && strlen($feild4) > 0)
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
no it doesnt work.it shows as blank space
– Ferna
Nov 22 at 8:52
do an echo inside the if condition where it the black space is coming.... let me know the output
– OneJeet
Nov 22 at 9:17
{ echo "Have a good day!"; }else { echo 'good day"'; } no error
– Ferna
Nov 22 at 10:09
Not clear. please echo the respective field value inside if for which the field value expected to be empty
– OneJeet
Nov 22 at 10:18
didn't get you ,it is still showing blank.so....if ! empty then results are displayed and if empty results are not displayed which i am expecting but it displays blank space of field 2 n 3
– Ferna
Nov 22 at 10:49
add a comment |
up vote
0
down vote
You can use this as well. Give it a try if this works...
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( $feild1 ) && strlen($feild1) > 0 )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( $feild2 ) && strlen($feild2) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( $feild3 ) && strlen($feild3) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( $feild4 ) && strlen($feild4) > 0)
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
no it doesnt work.it shows as blank space
– Ferna
Nov 22 at 8:52
do an echo inside the if condition where it the black space is coming.... let me know the output
– OneJeet
Nov 22 at 9:17
{ echo "Have a good day!"; }else { echo 'good day"'; } no error
– Ferna
Nov 22 at 10:09
Not clear. please echo the respective field value inside if for which the field value expected to be empty
– OneJeet
Nov 22 at 10:18
didn't get you ,it is still showing blank.so....if ! empty then results are displayed and if empty results are not displayed which i am expecting but it displays blank space of field 2 n 3
– Ferna
Nov 22 at 10:49
add a comment |
up vote
0
down vote
up vote
0
down vote
You can use this as well. Give it a try if this works...
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( $feild1 ) && strlen($feild1) > 0 )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( $feild2 ) && strlen($feild2) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( $feild3 ) && strlen($feild3) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( $feild4 ) && strlen($feild4) > 0)
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
You can use this as well. Give it a try if this works...
$res .= '<li class="acc-t"><span id="si"><u>QA:</u></span>';
if( ! empty( $feild1 ) && strlen($feild1) > 0 )
$res .= '<span id="hh" ><div class="acc-cont">'.$feild1.'</div></span>';
$res .= '</li>';
if( ! empty( $feild2 ) && strlen($feild2) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QC:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild2.'</div></span>';
$res .= '</li>';
if( ! empty( $feild3 ) && strlen($feild3) > 0 )
$res .= '<li class="acc-t"><span id="si"><u>QO:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild3.'</div></span>';
$res .= '</li>';
if( ! empty( $feild4 ) && strlen($feild4) > 0)
$res .= '<li class="acc-t"><span id="si"><u>QP:</u></span>';
$res .= '<span id="hh" ><div class="acc-cont">'.$feild4.'</div></span>';
$res .= '</li>';
answered Nov 22 at 8:11
OneJeet
898210
898210
no it doesnt work.it shows as blank space
– Ferna
Nov 22 at 8:52
do an echo inside the if condition where it the black space is coming.... let me know the output
– OneJeet
Nov 22 at 9:17
{ echo "Have a good day!"; }else { echo 'good day"'; } no error
– Ferna
Nov 22 at 10:09
Not clear. please echo the respective field value inside if for which the field value expected to be empty
– OneJeet
Nov 22 at 10:18
didn't get you ,it is still showing blank.so....if ! empty then results are displayed and if empty results are not displayed which i am expecting but it displays blank space of field 2 n 3
– Ferna
Nov 22 at 10:49
add a comment |
no it doesnt work.it shows as blank space
– Ferna
Nov 22 at 8:52
do an echo inside the if condition where it the black space is coming.... let me know the output
– OneJeet
Nov 22 at 9:17
{ echo "Have a good day!"; }else { echo 'good day"'; } no error
– Ferna
Nov 22 at 10:09
Not clear. please echo the respective field value inside if for which the field value expected to be empty
– OneJeet
Nov 22 at 10:18
didn't get you ,it is still showing blank.so....if ! empty then results are displayed and if empty results are not displayed which i am expecting but it displays blank space of field 2 n 3
– Ferna
Nov 22 at 10:49
no it doesnt work.it shows as blank space
– Ferna
Nov 22 at 8:52
no it doesnt work.it shows as blank space
– Ferna
Nov 22 at 8:52
do an echo inside the if condition where it the black space is coming.... let me know the output
– OneJeet
Nov 22 at 9:17
do an echo inside the if condition where it the black space is coming.... let me know the output
– OneJeet
Nov 22 at 9:17
{ echo "Have a good day!"; }else { echo 'good day"'; } no error
– Ferna
Nov 22 at 10:09
{ echo "Have a good day!"; }else { echo 'good day"'; } no error
– Ferna
Nov 22 at 10:09
Not clear. please echo the respective field value inside if for which the field value expected to be empty
– OneJeet
Nov 22 at 10:18
Not clear. please echo the respective field value inside if for which the field value expected to be empty
– OneJeet
Nov 22 at 10:18
didn't get you ,it is still showing blank.so....if ! empty then results are displayed and if empty results are not displayed which i am expecting but it displays blank space of field 2 n 3
– Ferna
Nov 22 at 10:49
didn't get you ,it is still showing blank.so....if ! empty then results are displayed and if empty results are not displayed which i am expecting but it displays blank space of field 2 n 3
– Ferna
Nov 22 at 10:49
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53424010%2fdont-print-blank-lines-when-data-fields-are-empty%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown