当前位置: 首页>>代码示例>>PHP>>正文


PHP formatPhone函数代码示例

本文整理汇总了PHP中formatPhone函数的典型用法代码示例。如果您正苦于以下问题:PHP formatPhone函数的具体用法?PHP formatPhone怎么用?PHP formatPhone使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了formatPhone函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: formatContact

function formatContact($array)
{
    foreach ($array as $index => $value) {
        $valueArray = explode('|', $value);
        unset($array[$index]);
        $array[$index]['name'] = $valueArray[0];
        $array[$index]['number'] = formatPhone($valueArray[1]);
    }
    return $array;
}
开发者ID:anthony87burns,项目名称:codeup-web-exercises,代码行数:10,代码来源:contact-parser.php

示例2: pmpro_formatAddress

function pmpro_formatAddress($name, $address1, $address2, $city, $state, $zip, $country, $phone, $nl2br = true)
{
    $address = "";
    if (!empty($name)) {
        $address .= $name . "\n";
    }
    if (!empty($address1)) {
        $address .= $address1 . "\n";
    }
    if (!empty($address2)) {
        $address .= $address2 . "\n";
    }
    if (!empty($city) && !empty($state)) {
        $address .= $city . ", " . $state;
        if (!empty($zip)) {
            $address .= " " . $zip;
        }
        $address .= "\n";
    }
    if (!empty($country)) {
        $address .= $country . "\n";
    }
    if (!empty($phone)) {
        $address .= formatPhone($phone);
    }
    if ($nl2br) {
        $address = nl2br($address);
    }
    return $address;
}
开发者ID:AmpleTech,项目名称:paid-memberships-pro,代码行数:30,代码来源:functions.php

示例3: writeContent

function writeContent()
{
    global $results;
    ?>

<h2>User Management</h2>

<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">
<table class="grid">
	<thead>
		<tr>
			<th></td>
			<th>Name</th>
			<th>Email</th>
			<th>Address</th>
			<th>Phone</th>
			<th>Admin</th>
		</tr>
	</thead>
	<tbody>
	<?php 
    while ($rs = mysql_fetch_array($results, MYSQL_ASSOC)) {
        ?>
		<tr<?php 
        echo !$rs['use_active'] ? ' class="inactive"' : '';
        ?>
>
			<td><?php 
        echo makeCheckbox('', $rs['use_id']);
        ?>
</td>
			<td><a href="user-edit.php?id=<?php 
        echo $rs['use_id'];
        ?>
" alt="<?php 
        echo $rs['use_image_path'];
        ?>
" rel="tooltip"><?php 
        echo $rs['use_name'];
        ?>
</a></td>
			<td><?php 
        echo '<a href="mailto:' . $rs['use_email'] . '">' . $rs['use_email'] . '</a>';
        ?>
</td>
			<td><?php 
        echo $rs['use_address'] . ' ' . $rs['use_address2'] . '<br />' . $rs['use_city'] . ' ' . $rs['use_state'] . ' ' . $rs['use_zip'];
        ?>
</td>
			<td><?php 
        echo formatPhone($rs['use_phone']);
        ?>
</td>
			<td><?php 
        echo $rs['use_admin'] ? 'Yes' : 'No';
        ?>
</td>
		</tr>
	<?php 
    }
    ?>
	</tbody>
</table>
<?php 
    echo makeButton('Add User', 'add') . ' ' . makeSubmit('Delete User(s)', 'delete') . ' ' . makeButton('Download Data', 'csv');
    ?>
</form>

<?php 
}
开发者ID:prymribb,项目名称:starter,代码行数:73,代码来源:user.php

示例4: htmlspecialchars

            $extra_html .= "<div id='ext_{$lino}' " . "style='position:absolute;width:750px;border:1px solid black;" . "padding:2px;background-color:#cccccc;visibility:hidden;" . "z-index:1000;left:-1000px;top:0px;font-size:9pt;'>\n" . "<table width='100%'>\n" . "<tr><td class='bold' align='center' colspan='2' style='padding:4pt 0 4pt 0'>" . htmlspecialchars($result_text) . "</td></tr>\n" . "<tr><td class='bold' width='1%' nowrap>" . xlt('Status') . ": </td>" . "<td>" . generate_select_list("form_result_status[{$lino}]", 'proc_res_status', $result_status, xl('Result Status'), '') . "</td></tr>\n" . "<tr><td class='bold' nowrap>" . xlt('Facility') . ": </td>" . "<td><input type='text' size='15' name='form_facility[{$lino}]'" . " value='{$result_facility}' " . " title='" . xla('Supplier facility name') . "'" . " style='width:100%' /></td></tr>\n" . "<tr><td class='bold' nowrap>" . xlt('Comments') . ": </td>" . "<td><textarea rows='3' cols='15' name='form_comments[{$lino}]'" . " title='" . xla('Comments for this result or recommendation') . "'" . " style='width:100%' />" . htmlspecialchars($result_comments) . "</textarea></td></tr>\n" . "<tr><td class='bold' nowrap>" . xlt('Notes') . ": </td>" . "<td><textarea rows='4' cols='15' name='form_notes[{$lino}]'" . " title='" . xla('Additional notes for this result or recommendation') . "'" . " style='width:100%' />" . htmlspecialchars($result_notes) . "</textarea></td></tr>\n" . "</table>\n" . "<p><center><input type='button' value='" . xla('Close') . "' " . "onclick='extShow({$lino}, false)' /></center></p>\n" . "</div>";
            $lastpoid = $order_id;
            $lastpcid = $order_seq;
            $lastprid = $report_id;
            ++$lino;
        }
    }
    if (!empty($facilities)) {
        // display facility information
        $extra_html .= "<table>";
        $extra_html .= "<tr><th>" . xl('Performing Laboratory Facility') . "</th></tr>";
        foreach ($facilities as $facilityID) {
            foreach (explode(":", $facilityID) as $lab_facility) {
                $facility_array = getFacilityInfo($lab_facility);
                if ($facility_array) {
                    $extra_html .= "<tr><td><hr></td></tr>" . "<tr><td>" . htmlspecialchars($facility_array['fname']) . " " . htmlspecialchars($facility_array['lname']) . ", " . htmlspecialchars($facility_array['title']) . "</td></tr>" . "<tr><td>" . htmlspecialchars($facility_array['organization']) . "</td></tr>" . "<tr><td>" . htmlspecialchars($facility_array['street']) . " " . htmlspecialchars($facility_array['city']) . " " . htmlspecialchars($facility_array['state']) . "</td></tr>" . "<tr><td>" . htmlspecialchars(formatPhone($facility_array['phone'])) . "</td></tr>";
                }
            }
        }
        $extra_html .= "</table>\n";
    }
    ?>

</table>

<?php 
    if ($form_review) {
        // if user authorized for pending review.
        if ($reviewauth) {
            ?>
  <center><p>
开发者ID:mindfeederllc,项目名称:openemr,代码行数:31,代码来源:orders_results.php

示例5: ucfirst

            $count++;
            continue;
        }
        if ($count == 6) {
            $phone = $phone . "-" . $temp;
            $count++;
            continue;
        }
        $phone = $phone . $temp;
        $count++;
    }
    return $phone;
}
$first = ucfirst($_POST["first"]);
$last = ucfirst($_POST["last"]);
$phone = formatPhone($_POST["phone"]);
$checklist = $_POST["checklist"];
echo "Welcome {$first} {$last}.<br>";
echo "Your phone number is {$phone}.<br>";
echo "Your hobbies are (showing only first three):<br>";
$count = 0;
foreach ($_POST["checklist"] as $check) {
    if ($count == 3) {
        break;
    }
    echo "<li>{$check}</li>";
    $count++;
}
?>
	</body>
</html>
开发者ID:evan2945,项目名称:Web-Programming,代码行数:31,代码来源:genout.php

示例6: formatPhone

, <?php 
                echo $bstate;
                ?>
 <?php 
                echo $bzipcode;
                ?>
 <?php 
                echo $bcountry;
                ?>
						<?php 
            }
            ?>
                         
						<br />
						<?php 
            echo formatPhone($bphone);
            ?>
					</p>
					<?php 
        }
        ?>
					
					<?php 
        if (!empty($AccountNumber)) {
            ?>
					<p>
						<strong><?php 
            _e("Payment Method", "pmpro");
            ?>
</strong><br />
						<?php 
开发者ID:kaiifalcutela,项目名称:eatdk,代码行数:31,代码来源:account.php

示例7: _e

    } else {
        ?>
						<input type="hidden" name="bcountry" value="US" />
					<?php 
    }
    ?>
				<div>
					<label for="bphone"><?php 
    _e('Phone', 'pmpro');
    ?>
</label>
					<input id="bphone" name="bphone" type="text" class="input <?php 
    echo pmpro_getClassForField("bphone");
    ?>
" size="30" value="<?php 
    echo esc_attr(formatPhone($bphone));
    ?>
" />
				</div>
				<?php 
    if ($skip_account_fields) {
        ?>
				<?php 
        if ($current_user->ID) {
            if (!$bemail && $current_user->user_email) {
                $bemail = $current_user->user_email;
            }
            if (!$bconfirmemail && $current_user->user_email) {
                $bconfirmemail = $current_user->user_email;
            }
        }
开发者ID:mathieuhays,项目名称:paid-memberships-pro,代码行数:31,代码来源:checkout.php

示例8: pretendSend

 protected function pretendSend($phone_number, $message)
 {
     $phone_number = formatPhone($phone_number);
     $message = trim($message);
     $message = substr($message, 0, 160);
     $inboxes = collect(Cache::get($this->pretend_cache_key, []));
     $message_id = $inboxes->count();
     $message_id++;
     $sending_at = date('Y-m-d H:i:s');
     $output = ['status' => 200, 'sms_id' => $message_id, 'destination' => $phone_number, 'message' => $message, 'is_long' => $is_long, 'sms_count' => $sms_count, 'character_count' => $message_length, 'message_status' => 'sent', 'delivery_status' => "Pesan terkirim ke " . $phone_number, 'note' => '', 'created_at' => $sending_at, 'delivered_at' => $sending_at, 'sender' => 'Pretender', 'app' => 'SMS Pretender'];
     $inboxes->push($output);
     Cache::put($this->pretend_cache_key, $inboxes->toArray(), 60 * 60);
     $message_length = strlen($message);
     $is_long = $message_length > 160 ? 1 : 0;
     $sms_count = intval($is_long == 1 ? ceil($message_length / 153) : 1);
     return collect($output)->toArray();
 }
开发者ID:Nuwira,项目名称:smsgw,代码行数:17,代码来源:Sms.php

示例9: trim

							<td>
								<?php 
									if(empty($theuser->pmpro_bfirstname))
										$theuser->pmpro_bfirstname = "";
									if(empty($theuser->pmpro_blastname))
										$theuser->pmpro_blastname = "";
									echo trim($theuser->pmpro_bfirstname . " " . $theuser->pmpro_blastname);
								?><br />
								<?php if(!empty($theuser->pmpro_baddress1)) { ?>
									<?php echo $theuser->pmpro_baddress1; ?><br />
									<?php if(!empty($theuser->pmpro_baddress2)) echo $theuser->pmpro_baddress2 . "<br />"; ?>										
									<?php if($theuser->pmpro_bcity && $theuser->pmpro_bstate) { ?>
										<?php echo $theuser->pmpro_bcity?>, <?php echo $theuser->pmpro_bstate?> <?php echo $theuser->pmpro_bzipcode?>  <?php if(!empty($theuser->pmpro_bcountry)) echo $theuser->pmpro_bcountry?><br />												
									<?php } ?>
								<?php } ?>
								<?php if(!empty($theuser->pmpro_bphone)) echo formatPhone($theuser->pmpro_bphone);?>
							</td>
							<td><?php echo $auser->membership?></td>	
							<td>										
								<?php if((float)$auser->initial_payment > 0) { ?>
									<?php echo $pmpro_currency_symbol; ?><?php echo $auser->initial_payment?>
								<?php } ?>
								<?php if((float)$auser->initial_payment > 0 && (float)$auser->billing_amount > 0) { ?>+<br /><?php } ?>
								<?php if((float)$auser->billing_amount > 0) { ?>
									<?php echo $pmpro_currency_symbol; ?><?php echo $auser->billing_amount?>/<?php echo $auser->cycle_period?>
								<?php } ?>
								<?php if((float)$auser->initial_payment <= 0 && (float)$auser->billing_amount <= 0) { ?>
									-
								<?php } ?>
							</td>						
							<td><?php echo date("m/d/Y", strtotime($theuser->user_registered))?></td>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:memberslist.php

示例10: page

	<div class="wrap">
		<div class="alignleft">
			<h2 class="free-estimate__title"><?php 
echo $site->free_estimate();
?>
</h2>
            <p class="free-estimate__summary hide-sm"><?php 
echo $site->free_estimate_summary();
?>
</p>
		</div>

		<a class="btn btn-dark alignright hide-sm" role="button" href="<?php 
echo page('contact')->url() . '/status:free-estimate';
?>
"><?php 
echo l::get('free_estimate_btn');
?>
</a>
		<a href="tel:<?php 
echo formatPhone($site->phone());
?>
">
			<button class="btn btn-dark aligncenter hide-md"><?php 
echo l::get('click_to_call');
?>
</button>
		</a>
	</div>
</section>
开发者ID:aguynamedirvin,项目名称:Paradise-Construction,代码行数:30,代码来源:free_estimate.php

示例11: getDeliverys

function getDeliverys($weekNumber, $dDay, $d)
{
    include '../connection.php';
    $listOfAllDrivers = genDList($db);
    $rQuery = "SELECT\n\t\t\t\t  clients.cFirstName,\n\t\t\t\t  clients.cLastName,\n\t\t\t\t  drivers.dID,\n\t\t\t\t  drivers.dFirstName,\n\t\t\t\t  drivers.dLastName,\n\t\t\t\t  drivers.dPhoneNumber,\n\t\t\t\t  routes.rID,\n\t\t\t\t  routes.rDate,\n\t\t\t\t  routes.rSuccess,\n\t\t\t\t  routes.rReschedule\n\t\t\t\tFROM routes\n\t\t\t\t  INNER JOIN clients\n\t\t\t\t  INNER JOIN drivers\n\t\t\t\tWHERE clients.cID = routes.cID\n\t\t\t\tAND drivers.dID = routes.dID\n\t\t\t\tAND routes.rWeek = {$weekNumber}\n\t\t\t\tAND routes.rDay = '{$dDay}'";
    //echo $rQuery;
    $route = $db->query($rQuery);
    $delCount = $route->num_rows;
    echo '<div>' . date("F j, Y", time() + $d) . '</div>';
    echo "<table class='alignleft table table-hover'>\n            <thead class='tableHead'>\n            <tr>\n\t\t\t\t<th>Driver</th>\n\t\t\t\t<th>Driver Number</th>\n\t\t\t\t<th>Client</th>\n\t\t\t\t<th>Status</th>\n            </tr>\n            </thead>\n            <tbody>";
    if ($delCount == 0) {
        echo "<tr>\n\t\t\t\t<th>No delivery today!</th>\n\t\t\t  </tr>";
    } else {
        while ($dInfo = $route->fetch_array()) {
            if ($dInfo['rSuccess'] == 1) {
                $status = "Delivered";
                #$action = "Deactivate";
            } else {
                $status = "Enroute";
                #$action = "Activate";
            }
            $rID = $dInfo['rID'];
            $dID = $dInfo['dID'];
            $clientName = $dInfo['cLastName'] . ', ' . $dInfo['cFirstName'];
            $driverName = $dInfo['dLastName'] . ', ' . $dInfo['dFirstName'];
            $driverNumber = formatPhone($dInfo['dPhoneNumber']);
            /*if($dDay == getTodaysDay(date('w'))){
            			$selectD = "<select onchange='changeDriver($rID,this.options[this.selectedIndex].value)'>
            						<option value='$dID'>$driverName</option>				
            						$listOfAllDrivers
            						</select>";
            		} else {
            			$selectD = $driverName;
            		}*/
            $selectD = "<select onchange='changeDriver({$rID},this.options[this.selectedIndex].value)'>\n\t\t\t\t\t\t\t<option value='{$dID}'>{$driverName}</option>\t\t\t\t\n\t\t\t\t\t\t\t{$listOfAllDrivers}\n\t\t\t\t\t\t\t</select>";
            echo "<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t{$selectD}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>{$driverNumber}</td>\n\t\t\t\t\t<td>{$clientName}</td>\n\t\t\t\t\t<td>{$status}</td>\n\t\t\t\t</tr>";
        }
    }
    echo "</tbody></table>";
}
开发者ID:Xaranta,项目名称:MOW-Delivery,代码行数:40,代码来源:functions.php

示例12: displayAddressInCategory

 /**
  * displayAddressInCategory
  *
  * Displays all the addresses in the given category.
  *
  * @param string $category Category name
  *
  * @return void
  */
 function displayAddressInCategory($category = '')
 {
     // All addresses
     $cat = 'cat=all&amp;';
     $sql = "SELECT a.`id`, `user`, `fname`, `lname`, `updated`, `home`, `email`,\n                    `country`, `address`, `city`, `state`, `zip`\n                FROM `fcms_users` AS u, `fcms_address` as a\n                WHERE u.`id` = a.`user`\n                AND ((\n                        `phpass` IS NOT NULL\n                        AND (\n                            `phpass` != 'PRIVATE'\n                            OR (a.`created_id` = ? AND `phpass` = 'PRIVATE')\n                        )\n                    )\n                    OR (\n                        `phpass` IS NULL\n                        AND (\n                            `password` != 'PRIVATE'\n                            OR (a.`created_id` = ? AND `password` = 'PRIVATE')\n                        )\n                    )\n                )\n                ORDER BY `lname`";
     $params = array($this->fcmsUser->id, $this->fcmsUser->id);
     // Member addresses
     if ($category == 'members') {
         $cat = 'cat=members&amp;';
         $sql = "SELECT a.`id`, `user`, `fname`, `lname`, `updated`, `home`, `email`,\n                        `country`, `address`, `city`, `state`, `zip`\n                    FROM `fcms_users` AS u, `fcms_address` as a\n                    WHERE u.`id` = a.`user`\n                    AND ((\n                            `phpass` IS NOT NULL\n                            AND `phpass` != 'NONMEMBER'\n                            AND `phpass` != 'PRIVATE'\n                        )\n                        OR (\n                            `phpass` IS NULL\n                            AND `password` != 'NONMEMBER'\n                            AND `password` != 'PRIVATE'\n                        )\n                    )\n                    ORDER BY `lname`";
         $params = array();
     } else {
         if ($category == 'non') {
             $cat = 'cat=non&amp;';
             $sql = "SELECT a.`id`, `user`, `fname`, `lname`, `updated`, `home`, `email`,\n                        `country`, `address`, `city`, `state`, `zip`\n                    FROM `fcms_users` AS u, `fcms_address` as a \n                    WHERE u.`id` = a.`user` \n                    AND (`phpass` = 'NONMEMBER' OR `password` = 'NONMEMBER')\n                    ORDER BY `lname`";
             $params = array();
         } else {
             if ($category == 'my') {
                 $cat = 'cat=my&amp;';
                 $sql = "SELECT a.`id`, `user`, `fname`, `lname`, `updated`, `home`, `email`,\n                        `country`, `address`, `city`, `state`, `zip`\n                    FROM `fcms_users` AS u, `fcms_address` as a \n                    WHERE u.`id` = a.`user` \n                    AND a.`created_id` = ?\n                    AND (`phpass` = 'PRIVATE' OR `password` = 'PRIVATE')\n                    ORDER BY `lname`";
                 $params = array($this->fcmsUser->id);
             }
         }
     }
     if (count($params) > 0) {
         $rows = $this->fcmsDatabase->getRows($sql, $params);
     } else {
         $rows = $this->fcmsDatabase->getRows($sql);
     }
     if ($rows === false) {
         $this->fcmsError->displayError();
         return;
     }
     foreach ($rows as $r) {
         $email = '';
         if (!empty($r['email'])) {
             $email = '<input type="checkbox" name="massemail[]" value="' . cleanOutput($r['email']) . '"/>';
         }
         $address = '';
         if (!empty($r['address'])) {
             $address .= cleanOutput($r['address']) . ', ';
         }
         if (!empty($r['city'])) {
             $address .= cleanOutput($r['city']) . ', ';
         }
         if (!empty($r['state'])) {
             $address .= cleanOutput($r['state']) . ', ';
         }
         if (!empty($r['zip'])) {
             $address .= cleanOutput($r['zip']);
         }
         echo '
                     <tr>
                         <td class="chk">' . $email . '</td>
                         <td><a href="?' . $cat . 'address=' . (int) $r['id'] . '">
                             ' . cleanOutput($r['lname']) . ', ' . cleanOutput($r['fname']) . '</a></td>
                         <td>' . $address . '</td>
                         <td>' . formatPhone($r['home'], $r['country']) . '</td>
                     </tr>';
     }
 }
开发者ID:lmcro,项目名称:fcms,代码行数:70,代码来源:addressbook_class.php

示例13: billing_content_func


//.........这里部分代码省略.........
                echo $current_user->user_email;
                ?>
<br />
                                    <?php 
                echo $baddress1;
                ?>
<br />
                                    <?php 
                if ($baddress2) {
                    echo $baddress2 . "<br />";
                }
                ?>
                                    <?php 
                if ($bcity && $bstate) {
                    ?>
                                        <?php 
                    echo $bcity;
                    ?>
, <?php 
                    echo $bstate;
                    ?>
 <?php 
                    echo $bzipcode;
                    ?>
 <?php 
                    echo $bcountry;
                    ?>
                                    <?php 
                }
                ?>
                         
                                    <br />
                                    <?php 
                echo formatPhone($bphone);
                ?>
                                </p>
                            <?php 
            }
            ?>

                            <?php 
            if (!empty($AccountNumber)) {
                ?>
                                <p>
                                    <strong><?php 
                _e("Payment Method", "pmpro");
                ?>
</strong><br />
                                    <?php 
                echo $CardType;
                ?>
: <?php 
                echo last4($AccountNumber);
                ?>
 (<?php 
                echo $ExpirationMonth;
                ?>
/<?php 
                echo $ExpirationYear;
                ?>
)
                                </p>
                            <?php 
            }
            ?>
开发者ID:TakenCdosG,项目名称:admissionsrevolution_new,代码行数:66,代码来源:shortcode.php

示例14: pmpro_getClassForField

						?>
					</select>
				</div>
				<?php
					}
					else
					{
					?>
						<input type="hidden" name="bcountry" value="US" />
					<?php
					}
				?>
				<div>
					<label for="bphone">Phone</label>
					<input id="bphone" name="bphone" type="text" class="input <?php echo pmpro_getClassForField("bphone");?>" size="30" value="<?php echo esc_attr($bphone)?>" /> 
					<?php echo formatPhone($bphone); ?>
				</div>		
				<?php if($skip_account_fields) { ?>
				<?php
					if($current_user->ID)
					{
						if(!$bemail && $current_user->user_email)									
							$bemail = $current_user->user_email;
						if(!$bconfirmemail && $current_user->user_email)									
							$bconfirmemail = $current_user->user_email;									
					}
				?>
				<div>
					<label for="bemail">E-mail Address</label>
					<input id="bemail" name="bemail" type="text" class="input <?php echo pmpro_getClassForField("bemail");?>" size="30" value="<?php echo esc_attr($bemail)?>" /> 
				</div>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:checkout.php

示例15: getAddressGroups

?>
<h1 class="cover-heading">Add New Item To Address Book</h1>

<br>


<?php 
$addressGroups = getAddressGroups();
$newAddressData = array();
if (isPostRequest()) {
    $newAddressData[0] = $_SESSION['currentUserID'];
    $newAddressData[1] = filter_input(INPUT_POST, 'selected_address_group');
    $newAddressData[2] = filter_input(INPUT_POST, 'fullname');
    $newAddressData[3] = filter_input(INPUT_POST, 'email');
    $newAddressData[4] = filter_input(INPUT_POST, 'address');
    $newAddressData[5] = formatPhone(stripPhone(filter_input(INPUT_POST, 'phone')));
    $newAddressData[6] = filter_input(INPUT_POST, 'website');
    $newAddressData[7] = filter_input(INPUT_POST, 'birthday');
    $errors = validation($newAddressData);
    if (count($errors) == 0) {
        $newAddressData[8] = uploadImage();
        if (empty($newAddressData[8])) {
            $errors[] = 'Image could not be uploaded';
            $results = 'Empty Image';
        }
        if (createContact($newAddressData)) {
            $results = 'New item added to address book';
        } else {
            $results = 'Item was not Added';
        }
    } else {
开发者ID:NWhitaker27,项目名称:PHPClassSummer2015,代码行数:31,代码来源:add.php


注:本文中的formatPhone函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。