Skip to main content
Jun 5, 2006 4:47 PM UTC
Answered

help with php detail page

Hello
I was hoping someone would help me figure out a problem.
Php
Mysql
I have configure a detail page which is working correctly. All fields are populating properly. The problem is that if a field is null, i want to hide the text before it.
Example
<td valign="top" align="left">Unit View: <?php echo $row_rscdetail['unit_view']; ?></td>

if there is not a value in $row_rscdetail['unit_view'] then I don't want Unit View: to be displayed.

Is there an easy way to do this.
Thanks in advance.
Tim
This topic is closed to new replies. Start a new post to keep the conversation going.
Newsgroup_UserCorrect answer
Inspiring
Jun 5, 2006 5:27 PM UTC
if ($row_rscdetail['unit_view'])) {
echo 'Unit View: ' .$row_rscdetail['uniview'];
}

i think will do it. or set your field to a variable, and check fro that.

> <td valign="top" align="left">Unit View: <?php echo
> $row_rscdetail['unit_view']; ?></td>
>
> if there is not a value in $row_rscdetail['unit_view'] then I don't
> want
> Unit View: to be displayed.
>
> Is there an easy way to do this.
> Thanks in advance.
> Tim
>
>


3 replies

Newsgroup_UserCorrect answer
Inspiring
Jun 5, 2006 5:27 PM UTC
if ($row_rscdetail['unit_view'])) {
echo 'Unit View: ' .$row_rscdetail['uniview'];
}

i think will do it. or set your field to a variable, and check fro that.

> <td valign="top" align="left">Unit View: <?php echo
> $row_rscdetail['unit_view']; ?></td>
>
> if there is not a value in $row_rscdetail['unit_view'] then I don't
> want
> Unit View: to be displayed.
>
> Is there an easy way to do this.
> Thanks in advance.
> Tim
>
>


Translate
Jun 5, 2006 6:29 PM UTC
Crash
That Did it

Thanks for saving me a lot more research time. I was having trouble finding the exact method.
Tim
Translate