Hey guys,

Having some difficulties understanding why my OR || operator is not working...
First part is BOOLEAN and it is working
Second part is STRING and it is working, it returns the desired value

What could it be ?

<?php if(($oferte->isOrdered($oferte->CleanSapStyleNumbers($oferta->VBELN)) == false) || ($oferte->OfertaValida($oferte->CleanSapStyleNumbers($oferta->VBELN))->valabilitate == "VALABILA")): ?>
some stuff
<?php endif; ?>

Recommended Answers

Does either of those statements return true or 1 or anything that is not null or false? If yes, then your || operator is working for sure :).

Jump to Post

All 4 Replies

Does either of those statements return true or 1 or anything that is not null or false? If yes, then your || operator is working for sure :).

if i use each part separately, it works ...

Got it solved with &&

Well that's pretty weird :p. The statement should then also be triggered with || if you ask me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.