answersLogoWhite

0

You must start with double quotes to get expanded variables, then escape nested ones with backslash

<?php echo form_radio($data['filename'], 0, '', "class="uniform" id="$data[ids]"");

Or use single quotes inside double

<?php echo form_radio($data['filename'], 0, '', "class='uniform' id='$data[ids]'");

Notice you don't need to quote single dimensional array indexes inside the square braces if inside double quotes

User Avatar

Wiki User

∙ 10y ago
User Avatar

What else can I help you with?

Related Questions

What does the php function eval?

The eval() function evaluates a string as PHP code. http://us.php.net/manual/en/function.eval.php


How do you reverse a string in PHP without using a function?

Without any function is impossible. So I'll assume you mean any coded function, in which case the predefined function below is your answer.$string = strrev($string);


How do you reverse a string in PHP?

A predefined function can reverse a string as shown below:echo strrev('pizza'); // outputs: azzip


How do you check the length of a string in PHP?

It is fairly simple to check the length of a string in PHP. All you need to do is use the function strlen(). Below is an example of how it is used. &lt;?php $my_text = "Hello"; echo strlen($my_text); // outputs 5 ?&gt;


How do you Count node left and Right for binary tree using PHP Codeigniter?

Oh, dude, counting nodes in a binary tree in PHP Codeigniter? That's like asking me to count all the jellybeans in a jar blindfolded. But hey, if you really wanna know, you could use a recursive function to traverse the tree, incrementing a counter for each left and right node you encounter. Just make sure to handle those null nodes like they owe you money.


How do you write string in reverse through the HTML tags?

Not possible through html. Use php strrev function. For eg:


How do you define a constant in PHP?

You can define a constant using the define() directive.you can use this a number of ways;to define a variable to a constant do:$string = "hello";define("string",$string);to define a string to a constant use:define("hello","there");to define a integer or other numerical value use:define("number",1.0);Summery:to define a string use quotes as you would do a string.Unlike variables in PHP a constant cannot be changed or undefined once it is defined. Constant remains automatically globally throughout the script. It means that it can be accessed from inside a function. e.g.


You use a Html button in Php on its onclick you made a function but its not responding?

this is not really a question... But I think you are asking why php functions inside a HTML button do not work. Well probably because php is rendered serverside and is passed to a user-browser afterwards.... it is possible to use php inside onclick... but only to display specific content (javascript function for instance)... it is not possible to let a user decide to run a specific php function by clicking a button.


How do you remove whitespaces from a string in PHP?

&lt;?php trim(ereg_replace( ' +', ' ', $extraWhiteSpace)); ?&gt;


What is var char in php?

Varchar in SQL means string in PHP.


Which function is used to retrive the part of the string?

If a string features a separator (e.g. a dot or a comma), use PHP's explode() function to get an array with the two parts: $string = "hello,joe" $array = explode(",", $string); $array[0] will be "hello" $array[1] will be "joe" If not, you may use substr() to return a certain length of a string


How to use strings with PHP and MySQL?

If you will see this example as below, this may help. &lt;?php $string = mysql_real_escape_string($string); $sql = "insert into stringtable(mystring) values('$string')"; ?&gt;