Home
Forums
Members
Search
Help
New topics
Todays topics
Website
Welcome Guest, Not a member yet?
Register
Sign In
Login
Username:
Password:
Remember me
Lost Password?
CodeIgniter Forums
Archived Discussions
Archived Development & Programming
Database Utility Class - csv_from_result
Share on Google
Share on Facebook
Share on Twitter
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend
Linear Mode
Threaded Mode
Database Utility Class - csv_from_result
El Forum
Guest
#1
01-15-2010, 05:00 PM
[eluser]mikepuerto[/eluser]
Any suggestions on how to prevent this from adding the delimiter to the last field on a line?
Example, the output is:
field1,field2,field3,field4,
need to get rid of the last comma on the line.
Thanks!
El Forum
Guest
#2
01-15-2010, 07:24 PM
[eluser]brianw1975[/eluser]
lol it's stupid simple, i struggled with it for a long time too and found it mindbogbling infuriating how easy it actually is, it's so easy I had to look it up! lol
// remove the trailing commas
$str = substr($str,0,-1);
El Forum
Guest
#3
01-17-2010, 10:59 AM
[eluser]mikepuerto[/eluser]
Awesome! Thnx!
--------------------
Private Messages
User Control Panel
Who's Online
Search
Forum Home
General
-- News & Discussion
-- Events
-- Lounge
-- Regional User Groups
Using CodeIgniter
-- Installation & Setup
-- Model-View-Controller
-- Libraries & Helpers
-- Best Practices
-- Choosing CodeIgniter
-- General Help
CodeIgniter 4
-- CodeIgniter 4 Roadmap
-- CodeIgniter 4 Development
-- CodeIgniter 4 Feature Requests
-- CodeIgniter 4 Support
-- CodeIgniter 4 Discussion
-- CodeIgniter 4 Addins
Development
-- CodeIgniter 3.x
-- CodeIgniter 2.x
-- Issues
-- NetBeans Plugin
External Resources
-- Spotlight
-- Learn More
-- Jobs
-- Addins
Archived Discussions
-- Archived Libraries & Helpers
-- Archived Development & Programming
Theme © iAndrew 2016 -
Forum software by © MyBB