PHP Conditional Region Based on Recordset Empty or Not Empty

I hope this helps someone, I spent way too many hours on it. I’m sure it’s simple for all you super code cooks, but for some (me) it can sure mess up your day.

  • If your recordset IS empty use this ==”” (equals nothing)
  • If your recordset is NOT empty use this >”” (is greater than nothing)

Here are some examples:

if ($row_rs_showif[‘this_url_img’]==””){
// Do Something }

if ($row_rs_showif[‘this_url_img’]>””){
// Do Something }