i need get characters length of "fsdfsdf". Who can help me? :)
$array = array(
'Firstname' => $wpdb->escape($_REQUEST['Firstname']),
'Lastname' => $wpdb->escape($_REQUEST['Lastname']),
'Phone' => $wpdb->escape($_REQUEST['Phone']),
'Email' => $wpdb->escape($_REQUEST['Email'])
);
print_r($array):
Array
(
[Firstname] => fsdfsdf
[Lastname] =>
[Phone] =>
[Email] =>
)
$char_length = strlen($array['Firstname']);
Try this,
$length = strlen($array[Firstname]);
echo $length;
希望对您有帮助,
echo strlen(trim($array['Firstname']));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.