/    Sign up×
Community /Pin to ProfileBookmark

comparison between two values of arrays

Hello,

i am beginner in php and i am trying to compare two value of array, i have two array both contain numeric value, and i am trying to compare(is less than or greater then) them using if condition first array contain greater value than second one and condition is full fill but block under if condition didn’t execute my come is like that.($san_Quan[$i]=5 and $qty[$p]=1)

if($san_Quan[$i]>$qty[$p])
{

$yes[$m]=$pn[$p];
$yes1[$m]=$san_name[$i].’/’.$qty[$p];$m++;
break;
}

please help

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @rajnipal spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...