CodeIgniter Forums

Full Version: use of php native functions...broke?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]fivestringsurf[/eluser]
'CI_VERSION', '1.7.2'Taken straight from the user guide; the below code does not work as expected
php's htmlspecialchars function is not evoked.
:

Code:
$this->load->library('table');

$this->table->set_heading('Name', 'Color', 'Size');
$this->table->add_row('Fred', '<strong>Blue</strong>', 'Small');

$this->table->function = 'htmlspecialchars';
echo $this->table->generate();

El Forum

[eluser]xatrix[/eluser]
Where exactly in the user guide does it say that there is a table->function?

Just use
Code:
add_row('Fred', htmlspecialchars('<strong>Blue</strong>'), 'Small');

El Forum

[eluser]fivestringsurf[/eluser]
http://ellislab.com/codeigniter/user-gui...table.html
scroll all the way to the bottom

El Forum

[eluser]xatrix[/eluser]
[quote author="fivestringsurf" date="1296714504"]'CI_VERSION', '1.7.2'[/quote]

This is a 2.0 feature. I've looked at the 1.7.3 user guide and there's no such thing. So, either upgrade or just use the php function as it is.

El Forum

[eluser]fivestringsurf[/eluser]
I see...i ran through the "upgrades" list but obviously missed it.
how to upgrade?
Is it as simple as replacing all the files and dirs in the folder "system" with the latest system files?
or will my existing code break somewhere? I'm slightly new to codeigniter and have never lived through an upgrade yet.
Thanks for your feedback.

El Forum

[eluser]InsiteFX[/eluser]
You will also need to change all your controllers and models!

Code:
Controller is now CI_Controller
and
Model is now CI_Model

InsiteFX

El Forum

[eluser]fivestringsurf[/eluser]
ok,thanks.