Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,847 members, 7,956,176 topics. Date: Monday, 23 September 2024 at 06:58 AM |
Nairaland Forum / Science/Technology / Webmasters / Can You Solve This PHP Problem?? (1320 Views)
Help To Correct This Php Mailer Code / [php] - Problem! Object Oriented. Accessing Variable In Function A In Function B / Php Problem: Retrieving Images And Display In Horizontally Format. (2) (3) (4)
Can You Solve This PHP Problem?? by emmyvet(m): 3:04pm On Dec 02, 2014 |
Hello, Please am having a little problem on my php $, I have; $ID = "1347"; Please is it possible for me to extract the first digit of the $ID which is 1? And put it into another $, with the name $firstdigit, that is $firstdigit = "1";//a code that can help me pull the ist digit in the $ID if its possible, can someone please give me a clue? |
Re: Can You Solve This PHP Problem?? by destino24(m): 3:28pm On Dec 02, 2014 |
$ID = "1347"; $firstdigit = substr($ID,0,1); //new variable takes in characters from position 0 to 1 might work, check it out |
Re: Can You Solve This PHP Problem?? by emmyvet(m): 3:39pm On Dec 02, 2014 |
destino24:Oh thanks bro! I Forgot the inbuilt fxn. |
Re: Can You Solve This PHP Problem?? by destino24(m): 3:44pm On Dec 02, 2014 |
emmyvet: totally cool, happens all the time. Had to check it up to get the answer |
Re: Can You Solve This PHP Problem?? by emmyvet(m): 3:50pm On Dec 02, 2014 |
destino24:Lol, That's why I cant do without my internet. |
Re: Can You Solve This PHP Problem?? by destino24(m): 3:56pm On Dec 02, 2014 |
emmyvet: so you are located at abakpa and you run a web development e-firm? |
Re: Can You Solve This PHP Problem?? by emmyvet(m): 3:59pm On Dec 02, 2014 |
destino24:Yes you are correct! Are you in Enugu? |
Re: Can You Solve This PHP Problem?? by destino24(m): 4:02pm On Dec 02, 2014 |
emmyvet: i stay at abakpa too |
Re: Can You Solve This PHP Problem?? by emmyvet(m): 4:06pm On Dec 02, 2014 |
destino24:Good to see you here! Are you available on Whatsapp or bbm? contacts on my signature |
Re: Can You Solve This PHP Problem?? by destino24(m): 4:15pm On Dec 02, 2014 |
emmyvet: sent you a message via whatsapp 1 Like |
Re: Can You Solve This PHP Problem?? by dwebdesign(m): 4:17pm On Dec 02, 2014 |
You are storing integer into a variable. You don't put open and close marks. Except you want to turn the integer into a string. Hope this help?. Contact: Mobile: 08133884165 What's app: 08133884165 BBM: 2BB63350 |
Re: Can You Solve This PHP Problem?? by emmyvet(m): 4:25pm On Dec 02, 2014 |
dwebdesign:The problem has been solved shaa, Am just trying to pick a digit from my $, but forgetting the inbuilt function substr(). Thanks! 1 Like |
Re: Can You Solve This PHP Problem?? by dwebdesign(m): 8:46pm On Dec 02, 2014 |
You are welcome. Happy coding! 1 Like |
Re: Can You Solve This PHP Problem?? by emmyvet(m): 10:02pm On Dec 04, 2014 |
dwebdesign: 1 Like |
Re: Can You Solve This PHP Problem?? by adenijiayo(m): 10:22am On Dec 05, 2014 |
$id = 1347; $firstdigit = $id[0]; echo $firstdigit. |
(1) (Reply)
Cheapest VPS And Dedicated Server In Nigeria / Professional Website Design Training Classes / Please Suggest Nigerian Blog Nich With High Search Kw
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 14 |