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

Slow data retrieval which requires improvement..please help
I am working on a Help Desk Ticketing system and have a page called MY TICKETS which shows all ticke

Feed Maker
Hi all.
First of all I must say I am not a php developer so I am afraid I don't know much about i

Include with Parameters
In a particular page I would like to include a file that requires $_GET parameters.

when I go

User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo

Echo-ing MySQL content and Keep Formatting?
I have data in my MySQL such as:

QuoteBlah blah

Blah blah

etc
but when i ech

function to return url
Hi,

Can you guys help me giving a function that takes all the contents in a particular field

PHP - MySQL Fail
My PHP code will only execute the first part of my code...

Code: <?php

sessio

Parse Error Help
Hello, I got the parse error "Parse error: syntax error, unexpected ',' in register.php on line

Extending Exception to contain method name
I was wondering, if there's a way to extend Exception in such a way, that it would contain name of a

connect() succeeds but accept() does not?
Please help me with this problem. I'm working on a time-sensitive project where I'm using TCP socket

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