今天是專案經理指導學習PHP實戰項目的第二天

來源:互聯網
上載者:User

標籤:學習   while   mysql   好的   項目   exp   資料   param   price   

最近比較浮躁不安,一直抗拒學習PHP,在身邊的朋友悉心引導下, 慢慢靜下心來。我好開心,能有這麼一個好的契機一邊上班 一邊學習。

<tr>
<td width="100">品牌</td>
<td>
<?php echo SqlSelect(‘goods where 1=1‘,‘brand‘,‘select‘,‘brand‘,‘-請選擇品牌-‘); ?>
</td>
</tr>

/**********資料庫篩選菜單********************************************************/
/**
* value 為ID時顯示函數
* @param string $SqlForm 表名+條件 admin where id = ‘$id‘
* @param string $SqlId 前端要顯示的value 一般為資料庫欄位
* @param string $SqlColumn 前端頁面顯示的title
* @param string $title 預設顯示,--請選擇--
* @param string $value 預設值的ID
*/
function SqlSelect($SqlForm,$SelectName,$class,$SqlColumn,$title){
$SearchSql = mysql_query("select * from {$SqlForm}");
while($Search = mysql_fetch_array($SearchSql)){
$key = $Search[$SqlColumn];
$option[$key] = $key;
}
return select($SelectName,$class,$title,$option);
}

 


/**********option列印函數********************************************************/
/**
* 列印函數
* @param string $title 預設第一個option
* @param array $option 選項集合 array(‘男‘,‘女‘)
* @param string $value 預設使用者選中
* @return 返回結果
*/

function option($title,$option,$value){}

<tr>
<td width="100">語種</td>
<td>
<select name="oLanguage" class="select textPrice">
<?php echo option(‘-請選擇語種-‘,explode(‘,‘,website(‘language‘)),$value);?>
</select>
</td>
</tr>

/**********輸出網站自訂文字********************************************************/
function website($id){
$website = query("website"," webid = ‘$id‘ ");
return $website[‘text‘];
}

/**********拆分字串為數值**************/
explode(‘邊界符‘,‘拆分的字串‘);

 

2017.08.18 筆記上

今天是專案經理指導學習PHP實戰項目的第二天

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.