insert PHP code into function


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

Hi,
I'm having problems when trying following:

I have:
Did you know?Explore Trending and Topic pages for more stories like this.
Code: [Select]createBar("Download: <b>$kwd</b><Br />", "100%")
and I'm trying to display following after $kwd:
Code: [Select]if(count($info['results']))
print '<div align="center" class="info"><b>'.$info['total_results_count'].'</b> results found, page '.$info['curpage'].' from '.$info['total_pages'].'</div>';

I replaced all double " by /" but this doesn't seems to work.
Code: [Select]createBar("Download: <b>$kwd</b> if(count($info['results'])) print '<div align="center" class="info"><b>'.$info['total_results_count'].'</b> results found, page '.$info['curpage'].' from '.$info['total_pages'].'</div>'<Br />", "100%")
I'm getting following error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in
No comments posted yet

Your Answer:

Login to answer
315 Like 24 Dislike
Previous forums Next forums
Other forums

Error: SQL Syntax; Line 1
Code:

<?php require "global_settings.php"; ?>
<title&g

mysql_real_escape_string
Let me preface this that I am very much a PHP noob, but I have some SQL training (not necessarily My

small inaccuracies
I have this code to convert fractional base 10 into base 2:

while($num > 0)

Extract text from string
Hi folks,

I have a string that looks like this:

aaaaaaaaaa:
bbbbbbbbbb (ccccccccc)

Table sorting
Hi,

I'm trying to modify the following in order to make the output table sorted alphabeticall

Array to string conversion
Can anyone help me with this?

Notice: Array to string conversion in /home/..../index.php on l

Code Help.. If txt input box empty search X instead..
I am having a problem with my search script. At current it will simply search by a selected date whi

Small problem with image resize script
Hi!

I am a little bit new to php and I have an issue installing an image resize script I down

problems with php variables in mysql query
i can't seem to get the following query to work.

select $q1c from $vote_rate where id = $re

RTF fomatting to email content
Im trying to sen an email with content is picked up from a rtf-file (file_get_contents('*.rtf'). Mai

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