Home >Backend Development >PHP Tutorial >PHP implementation code to reassign a certain column element

PHP implementation code to reassign a certain column element

小云云
小云云Original
2018-03-02 10:08:072028browse

This article mainly shares with you the PHP implementation code for reassigning a certain column of elements. I hope it can help you.

		foreach($list as $k=>$val){   
		    if ( $val == "" ) {  
		        continue;  
		    }  
		    foreach ($range as $key => $value) {
		    	//将时间替换成 年-月-日的形式 
			    if( $val['bodycode'] == $value['bodycode']){
			   
			    	$list[$k]['edittime'] = date("Y-m-d ", $value['time']);
			    }
		    }
		}

Related recommendations:

PHP implementation of deleting multiple array object attributes and reassigning them

The above is the detailed content of PHP implementation code to reassign a certain column element. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn