<?php function formatFieldKey($key_raw) { $re = '/([\w]+)/$1/'; $key = explode('_', $key_raw); print_r($key); $final_key = array(); foreach ($key as $word) { array_push(preg_replace('/(\b[a-z]{1})/', strtoupper(${1}), $word), $final_key); } return $final_key; } echo formatFieldKey('field_some_request');
You have javascript disabled. You will not be able to edit any code.