Giving space in a word
I've a table contain 2 fields DATEFROM & DATETO. Now i fetch dis names from table and display the same, but i want to display like DATE FROM & DATE TO...If it is this possible How? We have any functions li开发者_如何学运维ke 'explode()'? please help
If it is only used on those fields then you could use
str_replace('DATE', 'DATE ', $dateField);
But in that situation there is no way to determine where a word starts/ends otherwise.
If the field names were camel case or separated with underscores then it would be different.
You can use substring() to extract content from fields, if you want to name column differently, use as, e.g. select datefrom as [date from] from mytable
.
精彩评论