如何使用PHP代码添加<p>标签?

时间:2017-12-08 01:52:29

标签: php drupal drupal-modules

在PHP中,我想在某些内容中添加段落(<p>)类型的字段。使用网站构建我没有问题,但我找不到使用PHP代码正确执行的方法。

1 个答案:

答案 0 :(得分:-2)

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
    return inflater.inflate(R.layout.fragment_profile2, container, false);

    final TextView pn =getActivity().findViewById(R.id.pn);
    final TextView name =getActivity().findViewById(R.id.name);
    final TextView family =getActivity().findViewById(R.id.family);
    final TextView user =getActivity().findViewById(R.id.user);
    final TextView rank =getActivity().findViewById(R.id.rank);

    String pnget = getActivity().getIntent().getStringExtra("pn");
    String nameget = getActivity().getIntent().getStringExtra("name");
    String familyget = getActivity().getIntent().getStringExtra("family");
    String userget = getActivity().getIntent().getStringExtra("user");
    String rankget = getActivity().getIntent().getStringExtra("rank");

    pn.setText(pnget);
    name.setText(nameget);
    family.setText(familyget);
    user.setText(userget);
    rank.setText(rankget);
}