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:
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

problems with search form numerical "between" sending by php
I am trying to display the results of a search, on a sql database, on a web page. I set up html &quo

Displaying Column Names
I have a question regarding the ability to show the column names from my table/query.
What I'm lo

How to search for several parameters from objects in a database?
I have a database with lots of information about objects.
Now I would like to search for 4 or 5 p

Variables and Include
Code: [Select]<?php

$header = $_COOKIE['mss']['header'];
$body = $_COOKIE['mss']['b

Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount

How to make a input/output field with multiple lines
Hello.
I put a input/output field on the screen but I could not change height of it. I need to

Recording popularity by day, week.. all time?
Hey everyone, I'm creating a site designed around users uploading music. How can I implement a syste

removing space from the end of a variable
i have a variable $image which contains the following url "http://tiles.xbox.com/tiles/oo/P5/0m

Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get

How do I send data using an html link
Hi

If I have
<a href="main_file.php">

How do I send data t

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