More than one textarea giving me problems

Im using Bootstrap with Laravel 4.2. Whenever I try to add more than 1 textarea to my form, I get the following error: SQLSTATE[23000]: Integrity constraint violation: 1048 Column comment cannot be null I have isolated the problem to be that whichever textarea I allow to be first, no matter what variable name I give […]

Allow Some Special Characters using Regex

The following regex matches any Unicode Letters + Unicode Numbers + Vowel Signs + Dot + Dash + Underscore + Space ^\w\pN\pL\pM .-+$u Works successfully. I want to edit my regex so it accepts the following: ? ! ( ) % @ # , + : newline represents negative sign. My attempt doesnt […]

Strange $_SESSION var behivor in PHP

Ive been struggling with this for 2 days now. the code below works perfect on my localhost (WampServer Version 2.5, Apache v2.4.9, PHP 5.5.12) but not on my host server. I am trying to pass $_SESSION from one page to another (both files are under the same folder.) during a sign up for a new […]

Echo status message in php geonames timezone

Im using following code php to get timezone: $url = http:api.geonames.orgtimezone?lat= . $latitude . &lng= . $longitude . &username=demo; $xml = simplexml_load_file($url); foreach($xml->children() as $timezone) { echo TimezoneId: .$timezone->timezoneId. ; echo DstOffset : .$timezone->dstOffset. ; echo GmtOffset : .$timezone->gmtOffset. ; } it work but for latitude and longitude of Antartica for example it give error […]

Laravel 5 Parsedown returning plain html tags to browser

Ive installed parsedown (am using laravel 5) for parsing markdown and when I run it it is changing the markdown to html but the browser is plainly showing the parsed markdown instead of applying those particular styles for example when I run the following {{Parsedown::instance()->text(Hello _Parsedown_!)}} I expect when I run it in the browser: […]

How to detect and echo the last vowel in a word?

$word = Acrobat (or Apple, Tea etc.) How can I detect and echo the last vowel of a given word with php? I tried preg_match function, googled for hours but couldnt find a proper solution. There can be multibyte letters like ü, ö in the string. View More Answer And Comment : Stackoverflow I would personally […]