php - If !empty statement not working / event manager plugin -


this event manager on wordpress.

the following echos "website:" if field empty.

<?php if ( !empty( $em_event->event_contact['url'] ) ) {     echo $em_event->output(' '); } else {     echo $em_event->output('<strong>website:</strong> #_contacturl{url} ') ;  } ?> </p> 

how can echo "website:" if there www.website.com entered not echo "website:" if there no www.website.com entered?

you printing echo $em_event->output('<strong>website:</strong> #_contacturl{url} ') ; when $em_event->event_contact['url'] is empty.

run var_dump($em_event->event_contact['url']) right before if, show prints.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -