惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google Online Security Blog
Google Online Security Blog
博客园_首页
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
博客园 - Franky
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
博客园 - 司徒正美
V
V2EX
雷峰网
雷峰网
云风的 BLOG
云风的 BLOG
V
Visual Studio Blog
F
Full Disclosure
Y
Y Combinator Blog
V
V2EX - 技术
Attack and Defense Labs
Attack and Defense Labs
S
Security @ Cisco Blogs
Schneier on Security
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
SecWiki News
SecWiki News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
The GitHub Blog
The GitHub Blog
量子位
PCI Perspectives
PCI Perspectives
S
Secure Thoughts
D
Darknet – Hacking Tools, Hacker News & Cyber Security
AWS News Blog
AWS News Blog
Blog — PlanetScale
Blog — PlanetScale
爱范儿
爱范儿
K
Kaspersky official blog
B
Blog
A
Arctic Wolf
Hacker News: Ask HN
Hacker News: Ask HN
L
LangChain Blog
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
Recent Announcements
Recent Announcements
宝玉的分享
宝玉的分享
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
Lohrmann on Cybersecurity
D
Docker
A
About on SuperTechFans
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
The Last Watchdog
The Last Watchdog
S
Security Affairs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
Simon Willison's Weblog
Simon Willison's Weblog

博客园 - zhouwillpower

ms sqlserver 2005 属性islocked 不可用于登陆sa问题解决 sql随机日期 软件的质量因素 了 解 程 序 经 理 盒子 txt文件读写 xml解析 C#对称加密 C#哈希Md5加密 Ext自定义Vtype示例 C# DNN Sync Services for ADO.NET用于客户端与服务器同步的体系结构和类 Microsoft Sync Framework MSDN资料整理 抓住生活的尾翼继续前行 基于生活方式的时代 2006 年的这个春节 by zhouwillpower c#的Aop实现 by zhouwillpower asp.net ajax 版本冲突 by zhouwillpower aop应用概述 by zhouwillpower
php语法总结 by zhouwillpower
zhouwillpower · 2007-03-01 · via 博客园 - zhouwillpower

foreach语法表达:foreach($array as $value){ echo $value}

<?php
$strtest = "my test instance";
$array =  explode("t",$strtest);  #分割字符串
foreach ($array as $value)
{
      echo $value."<p>";    
}
echo implode("t",$array)."<p>";        #连接字符串  
echo strtok($strtest,'t')."<p>";       #根据字符截取字符串
echo substr($strtest,1,5)."<p>";       #根据位置和长度截取字符串
$inttest = similar_text($strtest,"test",&$percent);
echo $inttest ." ".$percent."<p>";  #比较字符串的相似度
echo stristr($strtest,"t")."<p>";   #查找字符串并返回该字符串剩余字符串
echo strpos($strtest,"t",5)."<p>";  #查找字符串并返回该字符串的位置
echo str_replace("test","new",$strtest)."<p>"; #替换字符串中指定字符并返回新的完整的字符串
echo chr(97)."<p>"; # ascii码到字符
echo ord("A")."<p>"; #字符到ascii码
$newarray = range(3,6);
echo  sizeof($newarray)."<p>";
echo  reset($newarray)."<p>";
echo  end($newarray)."<p>";
echo  pos($newarray)."<p>";
//arsort($newarray);
array_push($newarray,0,1,2);
array_pop($newarray);
array_shift($newarray);
array_unshift($newarray,8,9);
foreach ($newarray as $newvalue)
{
 echo $newvalue;
}
echo "<p>".floor(34.5435);
echo "<p>".ceil(34.5435);
echo "<p>".round(34.5435,3);
echo "<p>".M_PI;
echo "<p>".exp(1);
echo "<p>".pow(10,2);
echo "<p>".sqrt(10);
echo "<p>".srand(time());
echo "<p>".rand(1,100);
echo "<p>".getrandmax();

echo  "<p>".date("y年m月j日 H:i:s");
?>