Horje
How to work if empty value does not else | PHP String Code
How to work if empty value does not else

Sometimg If you use if empty tag for php it does not work else element.

Use if (!empty(trim($dimensions)))


How to use empty value if else not working

Follow the example.

index.php
Example: PHP
<?php if (!empty(trim($dimensions))) { echo $dimensions; } else { echo 'No';  } ?>
How to use empty value if else not working



Read Full::
PHP String Code
Category:
PHP Tutorial Code
Sub Category:
PHP String Code
Uploaded:
3 weeks ago
Uploaded by:
Admin
Views:
14

Related Articles
How to extract words from Sentence in PHP PHP String Code
How to check if string is_numeric() Function in PHP PHP String Code
How to get only text from HTML Source Code by PHP PHP String Code
How to get first 3 words from a sentence by PHP PHP String Code
How to work if empty value does not else PHP String Code

Single Articles
How to use empty value if else not working

Share on: