使用Php获取URL的最后一部分


Get the last part of a URL using Php

使用PHP,我想获得url的最后一部分(即最后一个斜杠之后的部分)。

所以,

发件人:

http://scta.info/resource/person/Aristotle

我只想买

Aristotle

$link = 'http://scta.info/resource/person/Aristotle';
$myarray = explode('/',$link);
echo end($myarray);