• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter helpful hints

#41
[eluser]Yash[/eluser]
excellent work xwero!!

really nice thread!!

#42
[eluser]xwero[/eluser]
I remember once there was a discussion whether the language library should have placeholders in the language strings but now with the language helper and the sprintf function you can have placeholders without changing the language library.
Code:
$lang['time_is'] = "The time is : %s"; // language file
echo sprintf(lang('time_is'),$time); // view file


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.