Simple AND question


Posted on 16th Feb 2014 07:03 pm by admin

Hello,

I've got following code:

Code: if(strpos($row[13],"http://")!==false) $info['results'][$num]['player']="PREVIEW";
else $info['results'][$num]['player']="NO PREVIEW";
and would like to add following AND statement
Code: AND ($media=="mp3")
Can someone advice me how to do please?

I'm getting following error: "unexpected T_LOGICAL_AND" in my code below.

Code: if(strpos($row[13],"http://")!==false) AND ($media=="mp3") $info['results'][$num]['player']="PREVIEW";
else $info['results'][$num]['player']="NO PREVIEW";
Thank you

No comments posted yet

Your Answer:

Login to answer
345 Like 43 Dislike
Previous forums Next forums
Other forums

mysql VARCHAR acting like INT
Hi, All.

I have a table that contains a varchar(10) column named weird_field. In this column

File upload issues
Hi Guys,

Can anyone see any issues with this code:
Code: [Select]$setImage= 'productimages

Help If user voted, block them
On my Prayer request site, i let users Click a button to Pray for somone that has posted a pray, i g

what are '%S%', '%E%'
for example when i see Code: [Select]printf("Hello %srn", $name);
what does %s means

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Login logout link help
Hi all,

Im new to php and Im having trouble creating a login/logout link for my page that dis

limitations on array_unique()
Does any one know what/how imitations are applied to array_unique? I have an issue where no matter h

simplexml and xpath - Need some help
Hello,

I am trying to parse an xml which comes back from Amazon and I am trying to know how m

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash