Hướng dẫn get last two words from string php - lấy hai từ cuối cùng từ chuỗi php

Tôi không thể tìm ra những điều sau đây: Tôi có các chuỗi được trả về từ đó tôi muốn đặt một vài từ đầu tiên trong một số thẻ HTML và hơn hai chuỗi cuối cùng như thế này:

This is a returned string

Tôi biết tôi có thể phát nổ chuỗi thành một mảng và biến mỗi từ trở thành một lần lặp, nhưng tôi chỉ có thể tìm ra cách đặt hai từ đầu tiên vào một thẻ HTML khác nhau và tôi muốn hai từ cuối cùng. Mỗi chuỗi có thể có một số từ khác nhau.

Tôi đã nghĩ đến việc làm một cái gì đó với số lượng mảng, như:

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';

Nhưng tôi nghĩ rằng nên có một cách dễ dàng hơn.

Có ai đó biết cách làm sạch nhất để thực hiện điều này là gì?

Mr_Cat

M.M.J.Kronenburg ¶

Hướng dẫn get last two words from string php - lấy hai từ cuối cùng từ chuỗi php

Cristianylf ¶

Đăng [at] Jannik - Zappe [dot] de ¶
I found this code which gets the last word, but am wondering how to modify it for different numbers of words. I tried adding a few things to the trim statement but to no avail.

14 năm trước

Vnonov tại Gmail Dot Com / Viktor Nonov ¶
$result = trim($words[count($words) - 1 ], '.?![](){}*');

12 năm trước
}

Robinhood70 tại Live Dot ca ¶

1 năm trước

14 năm trước

Steve tại Unily Biến DOT CO DOT NZ ¶Return part of a string

Nadeem ¶

8 năm trước(string $string, int $offset, ?int $length = null): string

M.M.J.Kronenburg ¶

6 năm trước

man13or tại hotmail dot fr ¶

2 năm trước

(Php 4, Php 5, Php 7, Php 8)

Subrtr - trả về phần của chuỗi

Sự mô tả

Subrtr (Chuỗi $string, int $offset,? int $length = null): Chuỗi

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
3

Thông số

string

Chuỗi đầu vào.

________số 8

Nếu offset không âm, chuỗi được trả về sẽ bắt đầu ở vị trí thứ 8 trong string, đếm từ số không. Ví dụ, trong chuỗi '

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
2', ký tự ở vị trí
$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
3 là '
$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
4', ký tự ở vị trí
$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
5 là '
$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
6', v.v.null, the substring starting from offset until the end of the string will be returned.

Nếu offset là âm, chuỗi được trả về sẽ bắt đầu ở ký tự ____ lần thứ 8 từ cuối string.

$string9

Nếu string dài hơn offset ký tự, một chuỗi trống sẽ được trả về.

Ví dụ số 1 sử dụng offset âm

1) 'pe' 2) '54' 3) 'gr' 4) '1' 5) '' 6) '' 7) '1200' 4

Nếu
1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 được đưa ra và dương, chuỗi được trả về sẽ chứa tối đa
1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 ký tự bắt đầu từ offset (tùy thuộc vào độ dài của string).
Nadeem ¶
8.0.0 8 năm trướcnull, the function returns a substring finishing at the end of the string, when it previously returned an empty string.
8.0.0 M.M.J.Kronenburg ¶$offset4.

6 năm trước

man13or tại hotmail dot fr ¶substr() usage

$offset5

$offset6

$offset7

2 năm trướcsubstr() casting behaviour

$offset8

$offset9

$length0

(Php 4, Php 5, Php 7, Php 8)

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'

Subrtr - trả về phần của chuỗi

Sự mô tảsubstr() returns an empty string as of PHP 8.0.0; previously, $offset4 was returned instead.

$length2

Subrtr (Chuỗi $string, int $offset,? int $length = null): Chuỗi

Thông số

string

  • Chuỗi đầu vào.
  • ________số 8
  • Nếu offset không âm, chuỗi được trả về sẽ bắt đầu ở vị trí thứ 8 trong string, đếm từ số không. Ví dụ, trong chuỗi '
    $string = this is a returned string;
    $words = explode(" ", $string);
    $count = count($words); // $words in this case is 5
    $amountofwordsbeforespan = $count - 2;
    echo '

    '.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

    ';
    2', ký tự ở vị trí
    $string = this is a returned string;
    $words = explode(" ", $string);
    $count = count($words); // $words in this case is 5
    $amountofwordsbeforespan = $count - 2;
    echo '

    '.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

    ';
    3 là '
    $string = this is a returned string;
    $words = explode(" ", $string);
    $count = count($words); // $words in this case is 5
    $amountofwordsbeforespan = $count - 2;
    echo '

    '.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

    ';
    4', ký tự ở vị trí
    $string = this is a returned string;
    $words = explode(" ", $string);
    $count = count($words); // $words in this case is 5
    $amountofwordsbeforespan = $count - 2;
    echo '

    '.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

    ';
    5 là '
    $string = this is a returned string;
    $words = explode(" ", $string);
    $count = count($words); // $words in this case is 5
    $amountofwordsbeforespan = $count - 2;
    echo '

    '.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

    ';
    6', v.v.
  • Nếu offset là âm, chuỗi được trả về sẽ bắt đầu ở ký tự ____ lần thứ 8 từ cuối string.
  • Nếu string dài hơn offset ký tự, một chuỗi trống sẽ được trả về.
  • Ví dụ số 1 sử dụng offset âm
  • 1) 'pe'
    2) '54'
    3) 'gr'
    4) '1'
    5) ''
    6) ''
    7) '1200'
    
    4

Nếu

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 được đưa ra và dương, chuỗi được trả về sẽ chứa tối đa
1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 ký tự bắt đầu từ offset (tùy thuộc vào độ dài của string).

13 năm trước

$length3

$length4

$length5

$length6

Nếu

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 được đưa ra và âm tính, thì nhiều ký tự sẽ bị bỏ qua từ cuối string (sau khi vị trí bắt đầu được tính toán khi offset âm). Nếu offset biểu thị vị trí của sự cắt ngắn này hoặc xa hơn, một chuỗi trống sẽ được trả về.

Nếu

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 được đưa ra và là
$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
3, một chuỗi trống sẽ được trả về.

$length7

$length8

$length9

null0

null1

Nếu

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 bị bỏ qua hoặc null, thì bộ nền bắt đầu từ offset cho đến khi kết thúc chuỗi sẽ được trả về.

17 năm trước

null2

null3

null4

null5

null6

null7

Ví dụ #2 sử dụng

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 âm

Nếu

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 được đưa ra và là
$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
3, một chuỗi trống sẽ được trả về.

null8

null9

string0

Nếu

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 bị bỏ qua hoặc null, thì bộ nền bắt đầu từ offset cho đến khi kết thúc chuỗi sẽ được trả về.

Ví dụ #2 sử dụng

1) 'pe'
2) '54'
3) 'gr'
4) '1'
5) ''
6) ''
7) '1200'
4 âm

string1

string2

string3

string4

Trả về giá trị

13 năm trước

string5

string6

string7

null7

Ivanhoe011 tại gmail dot com ¶

Rob Nospam tại Clancentric Dot Net

string9

offset0

offset1

offset2

Woutermb tại Gmail Dot Com ¶

13 năm trước

offset3

offset4

offset5

offset6

Kriskra tại Gmail Dot Com ¶

13 năm trước

offset7

offset8

offset9

offset0

14 năm trước

Steve tại Unily Biến DOT CO DOT NZ ¶

offset1

offset2

offset3

offset4

null7

Nadeem ¶

13 năm trước

offset6

offset7

offset8

offset9

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
00

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
01

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
02

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
03

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
04

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
05

Ivanhoe011 tại gmail dot com ¶

17 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
06

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
07

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
08

null7

liên kết ¶

13 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
10

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
11

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
12

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
13

Pheagey tại gmail dot com ¶

10 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
14

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
15

null7

Egingell tại Sisna Dot Com ¶

15 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
17

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
18

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
19

mar dot czapla tại gmail dot com ¶

13 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
20

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
21

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
22

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
23

Pheagey tại gmail dot com ¶

10 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
24

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
25

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
26

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
27

Egingell tại Sisna Dot Com ¶

10 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
28

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
29

null7

Egingell tại Sisna Dot Com ¶

15 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
31

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
32

null7

mar dot czapla tại gmail dot com ¶

10 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
34

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
35

null7

Egingell tại Sisna Dot Com ¶

10 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
37

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
38

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
39

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
40

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
41

Egingell tại Sisna Dot Com ¶

15 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
42

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
43

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
44

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
45

mar dot czapla tại gmail dot com ¶

chậm tại acedsl dot com

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
46

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
47

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
48

11 năm trước

Nhanh hơn ¶

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
49

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
50

null7

PHP_NET tại Thomas Dot Trella Dot de ¶

13 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
52

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
53

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
54

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
55

null7

17 năm trước

Leon Weidauer ¶

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
57

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
58

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
59

null7

Cristianylf ¶

15 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
61

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
62

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
63

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
64

liên kết ¶

13 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
65

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
66

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
12

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
68

mar dot czapla tại gmail dot com ¶

15 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
69

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
70

null7

mar dot czapla tại gmail dot com ¶

15 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
72

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
73

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
74

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
75

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
76

mar dot czapla tại gmail dot com ¶

15 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
77

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
78

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
79

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
80

mar dot czapla tại gmail dot com ¶

15 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
81

mar dot czapla tại gmail dot com ¶

15 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
82

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
83

null7

mar dot czapla tại gmail dot com ¶

chậm tại acedsl dot com

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
85

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
86

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
87

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
88

11 năm trước

Nhanh hơn ¶

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
89

PHP_NET tại Thomas Dot Trella Dot de ¶

17 năm trước

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
90

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
91

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
92

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
93

$string = this is a returned string;
$words = explode(" ", $string);
$count = count($words); // $words in this case is 5
$amountofwordsbeforespan = $count - 2;
echo '

'.$amountofwordsbeforespan.''.SOMETHING THAT PUTS THE LAST TWO HERE.'

';
94

null7