Hi any body help me

In DB Number of dates stored like this "03/18/2015,03/27/2015,03/30/2015,"

My view page also displaying using query

<?php echo $row['no_days']; ?>

displaying same "03/18/2015,03/27/2015,03/30/2015,".

but I want to display "03/18/2015,03/27/2015,03/30/2015"

any body help me

Recommended Answers

Hi, use trim() to remove the pending comma:

echo trim('a,b,c,', ',');

The same can be done at query level:

select trim(TRAILING ',' FROM 'a,b,c,');


Jump to Post

All 2 Replies

Thanx Problem is soloved

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.